2011/7/29 Eric Noulard <[email protected]>: > 2011/7/29 Bjørn Forsman <[email protected]>: >> What do you mean with 'not relocatable'? I didn't see any difference >> in the archive layouts of RPM and DEB when changing CPACK_SET_DESTIR >> from 'not set' to ON. > > if you do: > > rpm -qpi your.rpm > > you'll see a line like: > > "Relocations : (not relocatable)" > or > "Relocations : /usr" > > When an rpm is relocatable you can do > > rpm -i --prefix=/your/relocation/prefix your.rpm > > if the rpm is not relocatable you can't.
Aha, I see. >> Didn't you say that RPM and DEB generators sets >> CPACK_SET_DESTDIR=ON *itself*? > > Yes but not too soon (CPack internal step are indeed multiple) such that > CPack can effectively collect files which are installed purposely with > ABSOLUTE path and > treat them as config file in RPM specification file. > > When DESTDIR is set to ON by the user CPack cannot do this work > properly, and spit out a > warning like: > > "CPackRPM:Warning: CPACK_SET_DESTDIR is set (=ON) while requesting a > relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is > not supported, the package won't be relocatable." Aha, I see that now. >> I have never used CPACK_CONFIG_PROJECT_FILE, I just >> set(CPACK_SET_DESTDIR ON) in CMakeLists.txt and it fixed absolute >> DESTINATION paths for the archive generators. Just like you said in >> the first email. (Yay!) > > Because you wanted to go along the fast path and I cannot blame you > but I did Indeed indicate in my firts e-mail: > > "If you want to do some specific adjustment depending on the CPack > generator used > you may use a CPACK_PROJECT_CONFIG_FILE see doc here: > http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29" > > Now that the fast path works for you > I thought you may be interested in your CPack config "fine tuning". > > Read the link here: > http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29 > > and you'll see that you can setup diferent value of CPACK_<whateever> > var depending on the CPack Generator > which is run. > > Obviously this is not mandatory in your case because you already get > what you want, > but may be you want to try. Thanks a lot for the pointers. Best regards, Bjørn Forsman _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
