From 98291e961a6b5819670874870da1d8b2be0b272c Mon Sep 17 00:00:00 2001 From: xokc Date: Tue, 29 Aug 2023 14:12:37 +0300 Subject: [PATCH] Added support non-MSVC toolchains on Windows (fixed #1 issue) --- cmake/utils.cmake | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index b3d36d4..a2e560b 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -24,25 +24,28 @@ function(win_copy_deps_to_target_dir target) set(has_runtime_dll_genex YES) add_custom_command(TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" + COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" "$" "$" - COMMAND_EXPAND_LISTS) + COMMAND_EXPAND_LISTS) endif() foreach(dep ${ARGN}) get_target_property(dep_type ${dep} TYPE) - + set(pdb_files "") + if (MSVC) + set(pdb_files "$") + endif() if(dep_type STREQUAL "SHARED_LIBRARY") if(NOT has_runtime_dll_genex) add_custom_command(TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" - "$" "$" "$" - COMMAND_EXPAND_LISTS) + COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" + "$" "$pdb_files" "$" + COMMAND_EXPAND_LISTS) else() add_custom_command(TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" - "$" "$" - COMMAND_EXPAND_LISTS) + COMMAND ${CMAKE_COMMAND} -P "${mylib_SOURCE_DIR}/cmake/silent_copy.cmake" + "$pdb_files" "$" + COMMAND_EXPAND_LISTS) endif() endif() endforeach()