From 33c95d2f924cf22da025cfeac5d54034676776f8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 8 May 2010 07:06:45 +0000 Subject: -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 --- modules/FindKDE4Internal.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules') 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) -- cgit v1.2.1