From 409506c4c978ef116e9324b96ebf1d9f7e7da137 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Wed, 6 Dec 2017 16:47:41 -0500 Subject: 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 Commit-Queue: Mike Klein --- gn/BUILDCONFIG.gn | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'gn/BUILDCONFIG.gn') diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn index 05dc3573b5..e9912e2c26 100644 --- a/gn/BUILDCONFIG.gn +++ b/gn/BUILDCONFIG.gn @@ -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" -- cgit v1.2.3