File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,16 @@ if %target_arch%==x64 if %msvs_host_arch%==amd64 set vcvarsall_arg=amd64
166
166
:vs-set-2017
167
167
if " %target_env% " NEQ " vs2017" goto vs-set-2015
168
168
echo Looking for Visual Studio 2017
169
- if " _%VSCMD_ARG_TGT_ARCH% _" == " _%target_arch% _" goto found_vs2017
169
+ @ rem check if VS2017 is already setup, and for the requested arch
170
+ if " _%VisualStudioVersion% _" == " _15.0_" if " _%VSCMD_ARG_TGT_ARCH% _" == " _%target_arch% _" goto found_vs2017
171
+ set " VSINSTALLDIR = "
170
172
call tools\msvs\vswhere_usability_wrapper.cmd
171
173
if " _%VCINSTALLDIR% _" == " __" goto vs-set-2015
174
+ @ rem need to clear VSINSTALLDIR for vcvarsall to work as expected
172
175
set vcvars_call = " %VCINSTALLDIR% \Auxiliary\Build\vcvarsall.bat" %vcvarsall_arg%
173
176
echo calling: %vcvars_call%
174
177
call %vcvars_call%
178
+
175
179
:found_vs2017
176
180
echo Found MSVS version %VisualStudioVersion%
177
181
set GYP_MSVS_VERSION = 2017
@@ -193,10 +197,9 @@ if defined msi (
193
197
goto wix-not-found
194
198
)
195
199
)
196
- if " %VCVARS_VER% " NEQ " 140" (
197
- call " %VS140COMNTOOLS% \..\..\vc\vcvarsall.bat"
198
- SET VCVARS_VER = 140
199
- )
200
+ @ rem VS2015 vsvarsall is quick, so run anyway
201
+ call " %VS140COMNTOOLS% \..\..\vc\vcvarsall.bat"
202
+ SET VCVARS_VER = 140
200
203
if not defined VCINSTALLDIR goto msbuild-not-found
201
204
set GYP_MSVS_VERSION = 2015
202
205
set PLATFORM_TOOLSET = v140
You can’t perform that action at this time.
0 commit comments