From 5c4c003ffbd2de9f815fed9dda014b667f3aea5b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 19 Dec 2007 21:24:57 +0000 Subject: -fix RPATH change from yesterday The libs and plugins were built with RPATH, but with the install RPATH, which means that if you run some executable during the build, it may get installed libs, since the RPATH in the libs points to the install dir. Now the libs are linked with the RPATH to the build dir, and when installing they are relinked. This unfortunately takes some time. There are two ways around it: -set KDE4_USE_ALWAYS_FULL_RPATH to FALSE, then you will have the old behaviour or -use cmake cvs and current kdesupport, then the RPATH will be changed not by linking again but by running chrpath on the installed binary, which takes basically no time Alex svn path=/trunk/KDE/kdelibs/; revision=750683 --- modules/KDE4Macros.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/KDE4Macros.cmake') diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 029bdf93..e0e72318 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -501,9 +501,13 @@ endmacro (KDE4_CREATE_FINAL_FILES) # If RPATH is not explicitly disabled, libraries and plugins are built without RPATH, in # the hope that the RPATH which is compiled into the executable is good enough. macro (KDE4_HANDLE_RPATH_FOR_LIBRARY _target_NAME) - if (NOT CMAKE_SKIP_RPATH AND NOT KDE4_USE_ALWAYS_FULL_RPATH) - set_target_properties(${_target_NAME} PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH "") - endif (NOT CMAKE_SKIP_RPATH AND NOT KDE4_USE_ALWAYS_FULL_RPATH) + if (NOT CMAKE_SKIP_RPATH) + if(KDE4_USE_ALWAYS_FULL_RPATH) + set_target_properties(${_target_NAME} PROPERTIES SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) + else(KDE4_USE_ALWAYS_FULL_RPATH) + set_target_properties(${_target_NAME} PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH "") + endif(KDE4_USE_ALWAYS_FULL_RPATH) + endif (NOT CMAKE_SKIP_RPATH) endmacro (KDE4_HANDLE_RPATH_FOR_LIBRARY) # This macro sets the RPATH related options for executables -- cgit v1.2.1