diff options
author | Brian Osman <brianosman@google.com> | 2018-02-08 10:24:09 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 15:48:14 +0000 |
commit | c50f8e031b683e48b8c2e4645e96b4030e06dfcc (patch) | |
tree | 152b65ccc640481a29d19fd239b3aedb96fd8853 /gn/BUILDCONFIG.gn | |
parent | e88470eb166b52821d2d78dc2ca6d0312aad53ed (diff) |
Detect MSVC 2017 Community in GN
Change-Id: If5dc14cbed7d0c6e5ca47dae3408bbe3cf213eab
Reviewed-on: https://skia-review.googlesource.com/105609
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'gn/BUILDCONFIG.gn')
-rw-r--r-- | gn/BUILDCONFIG.gn | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn index 0e93f0a6b6..259b0d14b3 100644 --- a/gn/BUILDCONFIG.gn +++ b/gn/BUILDCONFIG.gn @@ -131,16 +131,24 @@ if (is_android) { msvc = "" if (target_os == "win") { - # By default we look for 2017, then 2015. If MSVC is installed in a non-default - # location, you can set win_vc to inform us where it is. - vc_2017_default = + # By default we look for 2017 (Pro & Community), then 2015. If MSVC is installed in a + # non-default location, you can set win_vc to inform us where it is. + vc_2017_pro_default = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC" + vc_2017_com_default = + "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC" vc_2015_default = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC" if (win_vc == "") { - if ("True" == - exec_script("//gn/checkdir.py", [ "$vc_2017_default" ], "trim string")) { - win_vc = vc_2017_default + if ("True" == exec_script("//gn/checkdir.py", + [ "$vc_2017_pro_default" ], + "trim string")) { + win_vc = vc_2017_pro_default + msvc = 2017 + } else if ("True" == exec_script("//gn/checkdir.py", + [ "$vc_2017_com_default" ], + "trim string")) { + win_vc = vc_2017_com_default msvc = 2017 } else if ("True" == exec_script("//gn/checkdir.py", [ "$vc_2015_default" ], |