diff options
| -rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 41 | ||||
| -rw-r--r-- | kde-modules/KDECompilerSettings.cmake | 30 | 
2 files changed, 41 insertions, 30 deletions
| diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake new file mode 100644 index 00000000..c6a7b93d --- /dev/null +++ b/kde-modules/KDECMakeSettings.cmake @@ -0,0 +1,41 @@ +# KDE_SKIP_RPATH_SETTINGS + + +################# RPATH handling ################################## + +if(NOT KDE_SKIP_RPATH_SETTINGS) + +   if(NOT LIB_INSTALL_DIR) +      message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.") +   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. +   if (UNIX) +      # the rest is RPATH handling +      # here the defaults are set +      # 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}) +      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) +         if("${_isSystemLibDir}" STREQUAL "-1") +            set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}") +         endif() + +         set(CMAKE_SKIP_BUILD_RPATH FALSE) +         set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +         set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +      endif () +   endif (UNIX) + +endif() + +################################################################### + + diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 38aa3255..328cd71b 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -130,36 +130,6 @@ if (WIN32)  endif (WIN32) -################# RPATH handling ################################## - -# 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. -if (UNIX) -   # the rest is RPATH handling -   # here the defaults are set -   # 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}) -   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) -      if("${_isSystemLibDir}" STREQUAL "-1") -         set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}") -      endif() - -      set(CMAKE_SKIP_BUILD_RPATH FALSE) -      set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -   endif () -endif (UNIX) - -################################################################### - -  # TODO: this should not be here, make sure nothing breaks without it  # if (Q_WS_X11) | 
