2011/7/28 Eric Noulard <[email protected]>:
> 2011/7/28 Bjørn Forsman <[email protected]>:
>>
>> Thanks a lot! With three lines in CMakeLists.txt I now get the same
>> behaviour for 'make install' and the package generators:
>>
>> set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) # don't prepend package name
>> etc. (for archive generators)
>> set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
>> set(CPACK_SET_DESTDIR ON) # fixes absolute paths for archive generators
>>
>> IMHO, it would be really sweet if cpack could default to
>> CPACK_SET_DESTDIR=ON and
>> CPACK_PACKAGING_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}. But I don't
>> know what that would mean in terms of backwards compatibility
>> breakage...
>
> As you guessed this is impossible without backward compat' breakage.
> e.g. be aware that with "CPACK_SET_DESTDIR" set to ON RPM and DEB
> behavior changes
> namely RPM package built with that may not be relocatable.

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. Didn't you say that RPM and DEB generators sets
CPACK_SET_DESTDIR=ON *itself*?

> You may set(CPACK_SET_DESTDIR ON) only for ArchiveGenerator if you
> use CPACK_CONFIG_PROJECT_FILE.

Huh?

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!)

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

Reply via email to