aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_clean_executables_in_bin.cmake4
-rw-r--r--scripts/cmake/vcpkg_copy_tools.cmake15
2 files changed, 12 insertions, 7 deletions
diff --git a/scripts/cmake/vcpkg_clean_executables_in_bin.cmake b/scripts/cmake/vcpkg_clean_executables_in_bin.cmake
index da8594daf..b479bd3d0 100644
--- a/scripts/cmake/vcpkg_clean_executables_in_bin.cmake
+++ b/scripts/cmake/vcpkg_clean_executables_in_bin.cmake
@@ -26,10 +26,12 @@ function(vcpkg_clean_executables_in_bin)
message(FATAL_ERROR "FILE_NAMES must be specified.")
endif()
- foreach(file_name ${_vct_FILE_NAMES})
+ foreach(file_name IN LISTS _vct_FILE_NAMES)
file(REMOVE
"${CURRENT_PACKAGES_DIR}/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
"${CURRENT_PACKAGES_DIR}/debug/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
+ "${CURRENT_PACKAGES_DIR}/bin/${file_name}.pdb"
+ "${CURRENT_PACKAGES_DIR}/debug/bin/${file_name}.pdb"
)
endforeach()
diff --git a/scripts/cmake/vcpkg_copy_tools.cmake b/scripts/cmake/vcpkg_copy_tools.cmake
index 147a42696..37cfabd3b 100644
--- a/scripts/cmake/vcpkg_copy_tools.cmake
+++ b/scripts/cmake/vcpkg_copy_tools.cmake
@@ -34,24 +34,27 @@ function(vcpkg_copy_tools)
endif()
if(NOT DEFINED _vct_SEARCH_DIR)
- set(_vct_SEARCH_DIR ${CURRENT_PACKAGES_DIR}/bin)
+ set(_vct_SEARCH_DIR "${CURRENT_PACKAGES_DIR}/bin")
elseif(NOT IS_DIRECTORY ${_vct_SEARCH_DIR})
message(FATAL_ERROR "SEARCH_DIR ${_vct_SEARCH_DIR} is supposed to be a directory.")
endif()
- foreach(tool_name ${_vct_TOOL_NAMES})
+ foreach(tool_name IN LISTS _vct_TOOL_NAMES)
set(tool_path "${_vct_SEARCH_DIR}/${tool_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
-
- if(EXISTS ${tool_path})
- file(COPY ${tool_path} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+ set(tool_pdb "${_vct_SEARCH_DIR}/${tool_name}.pdb")
+ if(EXISTS "${tool_path}")
+ file(COPY "${tool_path}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
else()
message(FATAL_ERROR "Couldn't find this tool: ${tool_path}.")
endif()
+ if(EXISTS "${tool_pdb}")
+ file(COPY "${tool_pdb}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
+ endif()
endforeach()
if(_vct_AUTO_CLEAN)
vcpkg_clean_executables_in_bin(FILE_NAMES ${_vct_TOOL_NAMES})
endif()
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endfunction()