diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-02-12 17:55:27 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-02-13 11:18:30 +0000 |
commit | e4a6f87088f2b80a495705bc59867c75a5a66db2 (patch) | |
tree | 72a6bb0d22496d9ce3c02e3872c0607060d180fd /CMakeLists.txt | |
parent | ce7619040f3886be049b861be2142bf22ea7f643 (diff) |
CMake: disable relocatable builds when dumpcap is being built
dumpcap with capabilities/setuid currently does not start due to missing
libwsutil when installed to a non-standard prefix such as /usr/local.
Bug: 15490
Change-Id: If7427ba9625d3702ab8aac2deeaf37b6d3fda2a0
Reviewed-on: https://code.wireshark.org/review/31995
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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f5be5bd928..eb2b31a8cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,17 @@ if(NOT (WIN32 OR APPLE)) # Provide a knob to optionally force absolute rpaths, # to support old/buggy systems and as a user preference # for hardening. - set(ENABLE_RPATH_ORIGIN TRUE CACHE BOOL + set(_enable_rpath_origin TRUE) + if(BUILD_dumpcap AND PCAP_FOUND) + # dumpcap will most likely be installed with + # capabilities or setuid. Relative RPATHs that + # resolve to non-standard library directories + # are ignored for such binaries and since we + # cannot achieve relocatable builds, just + # disable it by default. + set(_enable_rpath_origin FALSE) + endif() + set(ENABLE_RPATH_ORIGIN ${_enable_rpath_origin} CACHE BOOL "Use $ORIGIN with INSTALL_RPATH") mark_as_advanced(ENABLE_RPATH_ORIGIN) else() |