summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-04-15 23:22:26 +0000
committerGerald Combs <gerald@wireshark.org>2015-04-15 23:22:34 +0000
commit973b2884c64ebf9b82ca4a828faad7775b4eaba6 (patch)
tree4cb52eba2a9f2dfba197de64c920942e75f5b66d /CMakeLists.txt
parent8d9fdda9913a4773ebaf4fc34401ae8a24b729d7 (diff)
downloadwireshark-973b2884c64ebf9b82ca4a828faad7775b4eaba6.tar.gz
Revert "CMake: Try not to clobber our gspawn exes."
This accidentally reverted code from g40ce324. Will try again shortly. This reverts commit 8d9fdda9913a4773ebaf4fc34401ae8a24b729d7. Change-Id: I0bf7f351b926f1ce4b0c9e19fe0367add1dfee1e Reviewed-on: https://code.wireshark.org/review/8081 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2fb149c56f..cd3a360079 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1271,16 +1271,14 @@ if(WIN32)
endforeach(_dll)
- # Don't overwrite an exe if it's already there. We don't want to
- # clobber any previous code signing.
file(GLOB _gspawn_helpers
- RELATIVE "${GLIB2_DLL_DIR}"
"${GLIB2_DLL_DIR}/gspawn*.exe"
)
foreach(_gspawn_helper ${_gspawn_helpers})
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
- COMMAND if not exist \"${_dll_output_dir_win}\\${_gspawn_helper}\" xcopy ${_gspawn_helper} "${_dll_output_dir_win}" /D /Y
- WORKING_DIRECTORY "${GLIB2_DLL_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${_gspawn_helper}"
+ "${_dll_output_dir}"
)
endforeach()
@@ -1767,6 +1765,25 @@ macro(set_extra_executable_properties _executable _folder)
endif()
endmacro()
+macro(set_extcap_executable_properties _executable)
+ set_target_properties(androiddump PROPERTIES FOLDER "Executables/Extcaps")
+
+ set(PROGLIST ${PROGLIST} ${_executable})
+
+ if(WIN32)
+ set_target_properties(${_executable} PROPERTIES
+ LINK_FLAGS "${WS_LINK_FLAGS} /SUBSYSTEM:WINDOWS"
+ 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
+ RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/run/MinSizeRel/extcap
+ RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/run/RelWithDebInfo/extcap
+ )
+ else()
+ set_target_properties(${_executable} PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
+ endif()
+endmacro()
+
if(BUILD_wireshark_gtk AND GTK_FOUND)
set(wireshark_gtk_LIBS
gtkui
@@ -2174,19 +2191,11 @@ if(BUILD_androiddump)
extcap/androiddump.c
)
- set(COPY_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/extcap)
add_executable(androiddump ${androiddump_FILES})
add_dependencies(androiddump gitversion)
- if(WIN32)
- set_target_properties(androiddump PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS} /SUBSYSTEM:WINDOWS")
- else()
- set_target_properties(androiddump PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
- endif()
- set_target_properties(androiddump PROPERTIES FOLDER "Executables/Extcaps")
+ set_extcap_executable_properties(androiddump)
target_link_libraries(androiddump ${androiddump_LIBS})
install(TARGETS androiddump RUNTIME DESTINATION ${EXTCAP_DIR})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${COPY_CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
ADD_CUSTOM_COMMAND(