diff options
-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" ], |