diff options
| author | Christoph Cullmann <cullmann@kde.org> | 2015-10-13 13:33:26 +0200 | 
|---|---|---|
| committer | Christoph Cullmann <cullmann@kde.org> | 2015-10-13 13:33:26 +0200 | 
| commit | 20bf1de42b035eb669d0250f4d549c15f9256e58 (patch) | |
| tree | a84ba54be030015d99d0209867f4c79daeb723d4 | |
| parent | 7d148e333bd8d371cc67a767922ccaa64bcab8f5 (diff) | |
| download | extra-cmake-modules-20bf1de42b035eb669d0250f4d549c15f9256e58.tar.gz extra-cmake-modules-20bf1de42b035eb669d0250f4d549c15f9256e58.tar.bz2  | |
make it possible to build KDE Frameworks 5 with a plain qt 5.5.x installed from the normal qt.io installer on mac os
we can revisit this change, if it leads to problems for mac ports or homebrew
REVIEW: 125614
| -rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 26 | 
1 files changed, 14 insertions, 12 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index cefd6daa..8e7ff359 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -95,21 +95,23 @@ if(NOT KDE_SKIP_RPATH_SETTINGS)     endif()     if (UNIX) +      # for mac os: add install name dir in addition +      # check: is the rpath stuff below really required on mac os? at least it seems so to use a stock qt from qt.io        if (APPLE)           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 - such as /usr/lib on UNIX) -         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() - -         # Append directories in the linker search path (but outside the project) -         set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)        endif () + +      # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of +      # the standard system link directories - such as /usr/lib on UNIX) +      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() + +      # Append directories in the linker search path (but outside the project) +      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)     endif (UNIX)  endif()  | 
