Only look for WinSDK when building _for_ Windows

(Not when we're merely building _on_ Windows.)

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Win-Clang-arm64-Release-Android

Change-Id: I7ab7663fcac6e3631ebe82f440927a077d476528
Reviewed-on: https://skia-review.googlesource.com/81483
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2017-12-06 16:47:41 -05:00 committed by Skia Commit-Bot
parent 36a5b4a37b
commit 409506c4c9

View File

@ -133,6 +133,19 @@ if (is_android) {
}
}
if (target_os == "win") {
if (msvc == 2017 && win_toolchain_version == "") {
win_toolchain_version = exec_script("//gn/highest_version_dir.py",
[ "$windk/VC/Tools/MSVC" ],
"trim string")
}
if (win_sdk_version == "") {
win_sdk_version = exec_script("//gn/highest_version_dir.py",
[ "$win_sdk/Include" ],
"trim string")
}
}
# A component is either a static or a shared library.
template("component") {
_component_mode = "static_library"
@ -185,17 +198,6 @@ set_defaults("component") {
}
if (is_win) {
if (msvc == 2017 && win_toolchain_version == "") {
win_toolchain_version = exec_script("//gn/highest_version_dir.py",
[ "$windk/VC/Tools/MSVC" ],
"trim string")
}
if (win_sdk_version == "") {
win_sdk_version = exec_script("//gn/highest_version_dir.py",
[ "$win_sdk/Include" ],
"trim string")
}
# Windows tool chain
set_default_toolchain("//gn/toolchain:msvc")
default_toolchain_name = "msvc"