aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-25 16:54:44 -0700
committerGitHub <noreply@github.com>2017-10-25 16:54:44 -0700
commit73571b8eb7af2c77d0f411bb50fe0fa58e484b9c (patch)
tree162ad176b227b95348ee99e9eb840be32537f700 /scripts
parent2128152f73d0054d25cc564c7244bf4506080ded (diff)
parent2a617103266e8cc391197126fa16c29f65f13ca5 (diff)
downloadvcpkg-73571b8eb7af2c77d0f411bb50fe0fa58e484b9c.tar.gz
vcpkg-73571b8eb7af2c77d0f411bb50fe0fa58e484b9c.zip
Merge pull request #2034 from seanwarren/trim-sdk-version-string
Remove non-numeric characters from Windows SDK version string
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_get_windows_sdk.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake
index 64d8838e7..a8aad64a9 100644
--- a/scripts/cmake/vcpkg_get_windows_sdk.cmake
+++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake
@@ -10,7 +10,7 @@ function(vcpkg_get_windows_sdk ret)
message(FATAL_ERROR "Could not find Windows SDK")
endif()
- # Remove trailing newline
- string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}")
+ # Remove trailing newline and non-numeric characters
+ string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}")
set(${ret} ${WINDOWS_SDK} PARENT_SCOPE)
endfunction() \ No newline at end of file