diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-04-13 13:44:23 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-04-13 22:23:48 +0000 |
commit | 035d7412892574fcdf6953110cc4e6384602062f (patch) | |
tree | e7253fa9a337e025c6825e2f8ae190a64ef1695c /CMakeLists.txt | |
parent | 936f76fbf8db175f2bf83b395044b3bc61af3c2e (diff) |
Fix zlib DLL copy.
Switch to "if exist ... xcopy".
Change-Id: I255fd3e719645b247024583590b748104c5e15b9
Reviewed-on: https://code.wireshark.org/review/8056
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d4782cdb17..fd3fe77cf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1237,13 +1237,19 @@ if(WIN32) # The cairo, freetype, gio, gnutls, png, and other OBS-generated DLLs # depend on zlib1.dll. We compile zlib locally but the Debug # configuration (the default) creates zlibd1.dll. + file (TO_NATIVE_PATH "${_dll_output_dir}" _dll_output_dir_win ) foreach( _dll ${GLIB2_DLLS} $<$<CONFIG:Debug>:zlib1.dll> ) add_custom_command(TARGET copy_cli_dlls PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${GLIB2_DLL_DIR}/${_dll}" - "${_dll_output_dir}" + # It would be really handy if copy, xcopy, or "cmake + # -E copy_if_different" supported multiple files + # separated by whitespace, or if robocpy had a sane + # notion of exit codes. + COMMAND if exist \"${_dll}\" xcopy ${_dll} "${_dll_output_dir_win}" /D /Y + WORKING_DIRECTORY "${GLIB2_DLL_DIR}" ) endforeach(_dll) + + file(GLOB _gspawn_helpers "${GLIB2_DLL_DIR}/gspawn*.exe" ) |