1
From: Modestas Vainius <modax@debian.org>
2
Subject: Do not set install RPATH to /usr/lib by default
5
Last-Update: 2011-02-20
7
Use proper code in order to avoid setting INSTALL_RPATH to /usr/lib. It is
8
disallowed on Debian systems and is a bad practise in general.
10
--- a/cmake/FindPhononInternal.cmake
11
+++ b/cmake/FindPhononInternal.cmake
12
@@ -233,7 +233,10 @@ endif(APPLE)
13
# RPATH directories outside the current CMAKE_BINARY_DIR and also the library
14
# install directory. Alex
15
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
16
-set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
17
+list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemLibDir)
18
+if("${_isSystemLibDir}" STREQUAL "-1")
19
+ set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
20
+endif("${_isSystemLibDir}" STREQUAL "-1")