From c50f8e031b683e48b8c2e4645e96b4030e06dfcc Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 8 Feb 2018 10:24:09 -0500 Subject: Detect MSVC 2017 Community in GN Change-Id: If5dc14cbed7d0c6e5ca47dae3408bbe3cf213eab Reviewed-on: https://skia-review.googlesource.com/105609 Reviewed-by: Brian Salomon Commit-Queue: Brian Osman --- gn/BUILDCONFIG.gn | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gn/BUILDCONFIG.gn') 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" ], -- cgit v1.2.3