[CMake] new RPATH support questions
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Mar 6 14:16:11 EST 2006
Hi,
I just updated from current cvs.
CMakeLists.txt:
add_library(foo SHARED foo.c)
add_executable(footest main.c)
target_link_libraries(footest foor)
install_targets(/bin footest)
install_targets(/lib foo)
This has the effect, that footest is initially linked with rpath to the
library in the build dir, and when installed it is linked again but
without RPATH. I thought it should be relinked to the install RPATH ?
Besides that, AFAIK previous cmake version didn't relink during
installation. Are you sure it is a good idea to change the default
behaviour ?
Does RPATH actually only exist for executables or also for shared
libraries ? Does it have to be set for both or is it enough if it is set
for the executables ?
For KDE I plan the following:
1) CMAKE_SKIP_RPATH and create wrapper shell scripts which set
LD_LIBRARY_PATH
2) COMPILE_WITH_INSTALL_RPATH and INSTALL_RPATH=
${CMAKE_INSTALL_PREFIX}/lib
(for building releases)
3) COMPILE_WITH_INSTALL_RPATH and INSTALL_RPATH= ${LIBRARY_OUTPUT_PATH;
${CMAKE_INSTALL_PREFIX}/lib
(for developers, so that it runs also from the builddir)
Do you think this is sensible ?
I think relinking is not a good option for KDE, since this will take
really a lot of time.
Bye
Alex
--
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
More information about the CMake
mailing list