diff options
Diffstat (limited to 'gn/BUILDCONFIG.gn')
-rw-r--r-- | gn/BUILDCONFIG.gn | 24 |
1 files changed, 13 insertions, 11 deletions
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" |