diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2019-01-21 10:56:57 +0000 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-01-22 00:55:40 +0000 |
commit | 4f46a2af88e59654673aeb7cb55d1f55c4251a73 (patch) | |
tree | 59c56bec71f7245a1911bacca60ad310b9ca52c1 /extcap | |
parent | 020c90fd36a6760bf5c2a776bf97dfa448fb40e9 (diff) | |
download | wireshark-4f46a2af88e59654673aeb7cb55d1f55c4251a73.tar.gz wireshark-4f46a2af88e59654673aeb7cb55d1f55c4251a73.tar.bz2 wireshark-4f46a2af88e59654673aeb7cb55d1f55c4251a73.zip |
CMake: Set a direct rpath for libraries
Instead of using "$ORIGIN/../lib" just use "$ORIGIN".
Also be explicit in configuring the relative RPATH. We don't want
to assume a default relative path, in case more targets are addded,
out of caution.
Change-Id: I3b7f5e8de7be8bb30aca3b433212113d876c4163
Reviewed-on: https://code.wireshark.org/review/31647
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/CMakeLists.txt | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt index 58547ff031..860f75cf20 100644 --- a/extcap/CMakeLists.txt +++ b/extcap/CMakeLists.txt @@ -28,13 +28,16 @@ endif() macro(set_extcap_executable_properties _executable) - set_target_properties(${_executable} PROPERTIES FOLDER "Executables/Extcaps") + set_target_properties(${_executable} PROPERTIES + LINK_FLAGS "${WS_LINK_FLAGS}" + FOLDER "Executables/Extcaps" + INSTALL_RPATH "${EXTCAP_INSTALL_RPATH}" + ) set(PROGLIST ${PROGLIST} ${_executable}) if(WIN32) set_target_properties(${_executable} PROPERTIES - LINK_FLAGS "${WS_LINK_FLAGS}" RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/run/Debug/extcap RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/run/Release/extcap @@ -43,15 +46,8 @@ macro(set_extcap_executable_properties _executable) ) else() set_target_properties(${_executable} PROPERTIES - LINK_FLAGS "${WS_LINK_FLAGS}" RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap ) - 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/../.." - ) - endif() if(ENABLE_APPLICATION_BUNDLE) if(NOT CMAKE_CFG_INTDIR STREQUAL ".") # Xcode |