[vcpkg_copy_pdbs] Fix PDB path matching

This commit is contained in:
huangqinjin 2024-11-20 23:21:19 +08:00
parent 6e1219d080
commit d832d67123

View File

@ -28,7 +28,7 @@ function(vcpkg_copy_pdbs)
RESULT_VARIABLE error_code
)
if(error_code EQUAL "0" AND pdb_line MATCHES "PDB.*([A-Z]:.*\.pdb)")
if(error_code EQUAL "0" AND pdb_line MATCHES "PDB[^/]*(([A-Za-z]:|/).*\\.[Pp][Dd][Bb])")
set(pdb_path "${CMAKE_MATCH_1}")
cmake_path(GET dll PARENT_PATH dll_dir)
file(COPY "${pdb_path}" DESTINATION "${dll_dir}")