Use vswhere for getting the propoer VSCOMMTOOLS path in vs150/vs160

Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr>
This commit is contained in:
Francis ANDRE
2019-07-09 09:11:38 +02:00
parent 0d29342012
commit 60405ec93a

View File

@@ -36,10 +36,16 @@ set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150 | 160} rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150 | 160}
if "%1"=="" goto usage if "%1"=="" goto usage
set vswhere='build\exe\vswhere.exe -property installationPath' rem -version ^^[16.0^^,17.0^^)
for /f "delims=" %%a in (%vswhere%) do @set "VSCOMNTOOLS=%%a"
set VS_VERSION=vs%1 set VS_VERSION=vs%1
if %VS_VERSION%==vs160 (
set "VSWHERE='build\exe\vswhere.exe -property installationPath -version ^[16.0^,17.0^)'"
) else (
if %VS_VERSION%==vs150 (
set "VSWHERE='build\exe\vswhere.exe -property installationPath -version ^[15.0^,16.0^)'"
)
)
for /f " delims=" %%a in (%VSWHERE%) do @set "VSCOMNTOOLS=%%a"
if %VS_VERSION%==vs160 ( if %VS_VERSION%==vs160 (
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat