aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
diff options
context:
space:
mode:
Diffstat (limited to 'extcap')
-rw-r--r--extcap/CMakeLists.txt27
1 files changed, 17 insertions, 10 deletions
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt
index 242f66d434..0e8c95d69e 100644
--- a/extcap/CMakeLists.txt
+++ b/extcap/CMakeLists.txt
@@ -47,16 +47,23 @@ macro(set_extcap_executable_properties _executable)
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})
+ if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
+ # Xcode
+ set_target_properties(${_executable} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/$<CONFIG>/Wireshark.app/Contents/MacOS/extcap
+ )
+ else()
+ set_target_properties(${_executable} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/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()
endif()
endmacro()