diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2018-12-03 05:32:17 +0000 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-12-03 23:54:15 +0000 |
commit | 697623411c876a00060c1fa4cd86ace6ce41285c (patch) | |
tree | 7333fbdcee2892c4202dd5339575f82873388270 /extcap | |
parent | c3741a653b945be556bd606f5c8d3bc46f615d5f (diff) |
CMake: Use $ORIGIN with RPATH
Make our package relocatable on Unix systems.
Linux, Solaris and FreeBSD are known to support $ORIGIN.
Change-Id: Ibcdda33d62c075bfa867d006cb6aaf5824609011
Reviewed-on: https://code.wireshark.org/review/30896
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt index 3035b53206..8475a39598 100644 --- a/extcap/CMakeLists.txt +++ b/extcap/CMakeLists.txt @@ -46,6 +46,11 @@ macro(set_extcap_executable_properties _executable) LINK_FLAGS "${WS_LINK_FLAGS}" RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap ) + if(ENABLE_RPATH_ORIGIN) + set_target_properties(${_executable} PROPERTIES + INSTALL_RPATH "\$ORIGIN/../.." + ) + endif() if(ENABLE_APPLICATION_BUNDLE) if(NOT CMAKE_CFG_INTDIR STREQUAL ".") # Xcode |