aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-05-19 17:27:30 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2018-05-19 19:23:32 -0700
commit658f1caaab56e7559eca17653bd9ca87a900f136 (patch)
treec739a1ac2624bf8e3fed3003a77688f97145120c /scripts
parent438af21f07c57364e0fc2535fff525eb444f003b (diff)
downloadvcpkg-658f1caaab56e7559eca17653bd9ca87a900f136.tar.gz
vcpkg-658f1caaab56e7559eca17653bd9ca87a900f136.zip
[vcpkg_get_windows_sdk] Don't call powershell. Deduce from env
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_get_windows_sdk.cmake14
1 files changed, 2 insertions, 12 deletions
diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake
index a8aad64a9..e7d72a125 100644
--- a/scripts/cmake/vcpkg_get_windows_sdk.cmake
+++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake
@@ -1,16 +1,6 @@
# Returns Windows SDK number via out variable "ret"
function(vcpkg_get_windows_sdk ret)
- execute_process(
- COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1
- INPUT_FILE NUL
- OUTPUT_VARIABLE WINDOWS_SDK
- RESULT_VARIABLE error_code)
-
- if (error_code)
- message(FATAL_ERROR "Could not find Windows SDK")
- endif()
-
- # Remove trailing newline and non-numeric characters
- string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}")
+ set(WINDOWS_SDK $ENV{WindowsSDKVersion})
+ string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}")
set(${ret} ${WINDOWS_SDK} PARENT_SCOPE)
endfunction() \ No newline at end of file