diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-01-19 01:59:29 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-01-20 21:59:42 +0000 |
commit | 5dd86a0a7e96239fcec3d404c035413c1eb768a8 (patch) | |
tree | 8030d9e550240ff253ffbfb381a4e43f9fc7bc7d /extcap | |
parent | 91d68d2ec9c100b6c4e5185a97d38e1aedfecd4c (diff) |
CMake: do not set RPATH when installing to a system directory
When built with -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib
(as is done by many Linux distributions), do not set an unnecessary
RPATH. This was the case before v2.9.0rc0-2727-g697623411c.
Relocatable builds will still be possible with the default options as
/usr/local/lib is typically not considered a system library path.
Change-Id: Ic6ff1760183c20d3f9f9fb787604e888e116534e
Reviewed-on: https://code.wireshark.org/review/31602
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt index 384e62cb2d..58547ff031 100644 --- a/extcap/CMakeLists.txt +++ b/extcap/CMakeLists.txt @@ -46,9 +46,10 @@ macro(set_extcap_executable_properties _executable) LINK_FLAGS "${WS_LINK_FLAGS}" RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap ) - if(ENABLE_RPATH_ORIGIN) + if(CMAKE_INSTALL_RPATH MATCHES "\\$ORIGIN") + # Use relative path from ${EXTCAP_INSTALL_LIBDIR} to ${CMAKE_INSTALL_LIBDIR} set_target_properties(${_executable} PROPERTIES - INSTALL_RPATH "\$ORIGIN/../.." + INSTALL_RPATH "$ORIGIN/../.." ) endif() if(ENABLE_APPLICATION_BUNDLE) |