forked from signalwire/freeswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build-System] Fix Visual Studio detection logic to use the latest in…
…stalled when building FreeSWITCH or sound packages.
- Loading branch information
Showing
3 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
@REM check and set VS2017 environment | ||
rem VS2017U2 contains vswhere.exe | ||
@REM check and set Visual Studio environment | ||
rem There is vswhere.exe starting VS2017U2 | ||
if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
|
||
rem Use %ProgramFiles% in a 32-bit program prior to Windows 10) | ||
If Not Exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
|
||
If Not Exist "%VSWHERE%" ( | ||
echo "WARNING: Can't find vswhere.exe. It is a part of VS 2017 version 15.2 or later. Trying known path..." | ||
set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" | ||
set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" | ||
) ELSE ( | ||
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do ( | ||
set InstallDir=%%i | ||
) | ||
) | ||
|
||
echo Install dir is "%InstallDir%" | ||
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( | ||
set msbuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" | ||
if exist "%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" ( | ||
set msbuild="%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters