[vcpkg_copy_pdbs] Fix PDB path matching for link.exe on Wine (#42265)

This commit is contained in:
huangqinjin 2024-11-26 04:32:34 +08:00 committed by GitHub
parent 7b0568efbb
commit 6ae3ccc87c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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}")