diff options
| author | Alex Neundorf <neundorf@kde.org> | 2012-05-13 11:49:33 +0200 | 
|---|---|---|
| committer | Alex Neundorf <neundorf@kde.org> | 2012-05-13 11:49:33 +0200 | 
| commit | 6f4a677eb2de89c54f24071b0af000018e46bad1 (patch) | |
| tree | 314b3431402dff578914f63a4e9cbf4eb0efcece | |
| parent | 9199fe5b5ade52543889b7b312e69e214fb5d62c (diff) | |
| download | extra-cmake-modules-6f4a677eb2de89c54f24071b0af000018e46bad1.tar.gz extra-cmake-modules-6f4a677eb2de89c54f24071b0af000018e46bad1.tar.bz2  | |
fix RPATH handling
- we need to make sure that the install dir we are looking at is an absolute path
- there was a typo in one of the variable names, it was never right
Alex
| -rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index 4f765ae8..9e149667 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -12,6 +12,11 @@ if(NOT KDE_SKIP_RPATH_SETTINGS)        message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.")     endif() +   set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") +   if (NOT IS_ABSOLUTE "${_abs_LIB_INSTALL_DIR}") +      set(_abs_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") +   endif() +     # setup default RPATH/install_name handling, may be overridden by KDE4_HANDLE_RPATH_FOR_EXECUTABLE     # It sets up to build with full RPATH. When installing, RPATH will be changed to the LIB_INSTALL_DIR     # and all link directories which are not inside the current build dir. @@ -21,16 +26,16 @@ if(NOT KDE_SKIP_RPATH_SETTINGS)        # which are partly overwritten in kde4_handle_rpath_for_library()        # and kde4_handle_rpath_for_executable(), both located in KDE4Macros.cmake, Alex        if (APPLE) -         set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) +         set(CMAKE_INSTALL_NAME_DIR ${_abs_LIB_INSTALL_DIR})        else ()           # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of the standard system link           # directories listed in CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) and use the RPATH figured out by cmake when compiling -         list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemLibDir) -         list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES      "${LIB_INSTALL_DIR}" _isSystemCxxLibDir) -         list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES        "${LIB_INSTALL_DIR}" _isSystemCLibDir) -         if("${_isSystemPlatformLibDir}" STREQUAL "-1"  AND  "${_isSystemCxxLibDir}" STREQUAL "-1"  AND  "${_isSystemCLibDir}" STREQUAL "-1") -            set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}") +         list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemLibDir) +         list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES      "${_abs_LIB_INSTALL_DIR}" _isSystemCxxLibDir) +         list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES        "${_abs_LIB_INSTALL_DIR}" _isSystemCLibDir) +         if("${_isSystemLibDir}" STREQUAL "-1"  AND  "${_isSystemCxxLibDir}" STREQUAL "-1"  AND  "${_isSystemCLibDir}" STREQUAL "-1") +            set(CMAKE_INSTALL_RPATH "${_abs_LIB_INSTALL_DIR}")           endif()           set(CMAKE_SKIP_BUILD_RPATH FALSE)  | 
