aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-04-16 11:38:04 -0700
committerGerald Combs <gerald@wireshark.org>2015-04-17 18:08:36 +0000
commit3d7b72817301530000efd2ae44d7b34bbe57318d (patch)
tree17c8216abc9c77f46d36b3b3ef110a670223ca94 /CMakeLists.txt
parentf2070bdbf973f0c5de6b2dd0532aea46e8e05f63 (diff)
Make androiddump loadable on OS X.
Make sure the target location for extcap executables and extcap_dir match on OS X. Set the extcap directory to Contents/MacOS/extcap. The Mac Developer Library documentation doesn't explicitly define "Resources", but examples include data files and not executables. It does state that executables shouldn't go into PlugIns. Make sure we rpathify androiddump. Change-Id: If36c762e2a1991c26e5c01a870deaf191bcf9f94 Reviewed-on: https://code.wireshark.org/review/8093 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6787799966..2cac4cb722 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1798,6 +1798,18 @@ macro(set_extcap_executable_properties _executable)
LINK_FLAGS "${WS_LINK_FLAGS}"
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap
)
+ if(ENABLE_APPLICATION_BUNDLE)
+ set_target_properties(${_executable} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY run/Wireshark.app/Contents/MacOS/extcap
+ )
+ # Add a wrapper script which runs each executable from the
+ # correct location. This adds convenience but makes debugging
+ # more difficult.
+ file(REMOVE ${CMAKE_BINARY_DIR}/run/${_executable})
+ file(WRITE ${CMAKE_BINARY_DIR}/run/${_executable} "#!/bin/sh\n")
+ file(APPEND ${CMAKE_BINARY_DIR}/run/${_executable} "exec ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/MacOS/extcap/${_executable} \"\$\@\"\n")
+ execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run/${_executable})
+ endif()
endif()
endmacro()