mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 19:32:46 +08:00
[vcpkg] copy tools pdb if they exist. (#14396)
This commit is contained in:
parent
f754a36589
commit
5eae413e9c
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user