[scripts] allow / in WindowsSDKVersion (#42139)

This commit is contained in:
Alexander Neumann 2024-11-14 11:05:03 +01:00 committed by GitHub
parent 81a178ad4b
commit b36dc82016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
function(vcpkg_get_windows_sdk out_var)
if("$ENV{WindowsSDKVersion}" MATCHES [[^([0-9.]*)\\?$]])
if("$ENV{WindowsSDKVersion}" MATCHES [[^([0-9.]*)(\\|/)?$]])
set("${out_var}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
else()
message(FATAL_ERROR "Unexpected format for ENV{WindowsSDKVersion} ($ENV{WindowsSDKVersion})")