diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-08-13 13:41:55 +0200 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-08-13 15:01:00 +0000 |
commit | 292708ab32ec46279fefb045161606037ed89330 (patch) | |
tree | 4a1b04b612ac970ff4c3301b252db3fde04dc8ec /CMakeLists.txt | |
parent | 84b86bdfa2ef7186ede9c416a61d8682bf818bb7 (diff) |
CMake: allow CMAKE_INSTALL_RPATH to be overridden
By default CMake sets the RPATH for built binaries to the build
directory. To enable relocatable build directories, I override this
RPATH as follows during development:
-DCMAKE_BUILD_WITH_INSTALL_RPATH=1
-DCMAKE_INSTALL_RPATH='$ORIGIN:$ORIGIN/../extcap/..'
To make work (again), do not overwrite CMAKE_INSTALL_RPATH in
CMakeLists.txt.
Change-Id: I7f238af07926ea706a3f999c5b1e13286ca53a66
Fixes: v2.5.0rc0-664-g55dd9b16d5 ("CMake: Update RPATH during installation.")
Reviewed-on: https://code.wireshark.org/review/23062
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c261932b6..1e6e0b4f7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,7 @@ include(CMakeInstallDirs) # Make sure our executables can can load our libraries if we install into # a non-default directory on UNIX/Linux. # https://cmake.org/Wiki/CMake_RPATH_handling -if(NOT (WIN32 OR APPLE)) +if(NOT CMAKE_INSTALL_RPATH AND NOT (WIN32 OR APPLE)) LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" IS_SYSTEM_DIR) if("${IS_SYSTEM_DIR}" STREQUAL "-1") SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") |