aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2010-05-08 07:06:45 +0000
committerAlexander Neundorf <neundorf@kde.org>2010-05-08 07:06:45 +0000
commit33c95d2f924cf22da025cfeac5d54034676776f8 (patch)
tree8e407e792ed9c59153d7fb4e45e5d2e9385ac756 /modules
parent121cf2babaa736e4110d30b28e41d6c199841aaf (diff)
downloadextra-cmake-modules-33c95d2f924cf22da025cfeac5d54034676776f8.tar.gz
extra-cmake-modules-33c95d2f924cf22da025cfeac5d54034676776f8.tar.bz2
-don't set the install RPATH to LIB_INSTALL_DIR if LIB_INSTALL_DIR is one of the standard system
link directories, like e.g. /usr/lib (which are listed in CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES, which is set in Modules/Platform/UnixPaths.cmake) Alex svn path=/trunk/KDE/kdelibs/; revision=1124215
Diffstat (limited to 'modules')
-rw-r--r--modules/FindKDE4Internal.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index d71418c1..006cc2d2 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -994,8 +994,14 @@ if (UNIX)
if (APPLE)
set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
else (APPLE)
- # add our LIB_INSTALL_DIR to the RPATH and use the RPATH figured out by cmake when compiling
- set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} )
+ # 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("${_isSystemLibDir}" STREQUAL "-1")
+
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)