diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-11-06 03:16:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-05 18:16:47 -0800 |
| commit | 5eae413e9ca1936dc94b643929a30d7660ab9593 (patch) | |
| tree | b7c0a0f4c00c418349fd80b9b652e6afd3e7bb20 /scripts/cmake | |
| parent | f754a3658943106358ade75716f472f30809a76b (diff) | |
| download | vcpkg-5eae413e9ca1936dc94b643929a30d7660ab9593.tar.gz vcpkg-5eae413e9ca1936dc94b643929a30d7660ab9593.zip | |
[vcpkg] copy tools pdb if they exist. (#14396)
Diffstat (limited to 'scripts/cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_clean_executables_in_bin.cmake | 4 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_copy_tools.cmake | 15 |
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()
|
