@echo off setlocal set Target=%~1 set VisualStudioVersion=%~2 set Clean=%~3 set Verbosity=%~4 if "%Target%"=="" ( set Target=All ) if "%VisualStudioVersion%"=="" ( set VisualStudioVersion=15.0 ) if "%Clean%"=="" ( set Clean=yes ) if "%Verbosity%"=="" ( set Verbosity=normal ) if "%Target%"=="CleanAll" ( set Clean=no ) if "%Target%"=="CopyExtras" ( set Clean=no ) if "%Target%"=="DisplayMessages" ( set Clean=no ) if "%Target%"=="MakeDirectories" ( set Clean=no ) if "%Target:~0,5%"=="Build" ( set Clean=no ) if "%Target:~0,5%"=="Clean" ( set Clean=no ) if "%Target:~0,9%"=="Configure" ( set Clean=no ) if "%Target:~0,4%"=="Copy" ( set Clean=no ) if "%Target:~0,8%"=="Download" ( set Clean=no ) if "%Target:~0,7%"=="Extract" ( set Clean=no ) if "%Target:~0,3%"=="Set" ( set Clean=no ) set _MyDir=%~dp0 set _MyDir=%_MyDir:~0,-1% if "%Target%"=="-?" goto :DisplayHelp if "%Target%"=="-h" goto :DisplayHelp if "%Target%"=="--help" goto :DisplayHelp call FindMSBuild.bat if not defined MSBuild goto :EOF set VcpkgEnabled=false echo "%MSBuild%" /nologo /property:VisualStudioVersion=%VisualStudioVersion% /verbosity:%Verbosity% /target:%Target% "%_MyDir%\SDKs.proj" "%MSBuild%" /nologo /property:VisualStudioVersion=%VisualStudioVersion% /verbosity:%Verbosity% /target:%Target% "%_MyDir%\SDKs.proj" if errorlevel 1 goto :EOF if not "%Target%"=="MakeDirectories" ( if not "%Target%"=="CopyExtras" ( if not "%Clean%"=="no" ( "%MSBuild%" /nologo /property:VisualStudioVersion=%VisualStudioVersion% /verbosity:%Verbosity% /target:Clean%Target% "%_MyDir%\SDKs.proj" if errorlevel 1 goto :EOF ) ) ) endlocal goto :EOF :DisplayHelp echo %0 ${Target} ${VisualStudioVersion} ${Clean} ${Verbosity} echo. echo Where echo * Target is the target to build. echo * VisualStudioVersion is 14.0 for Visual Studio 14 2015 echo or 15.0 for Visual Studio 15 2017. echo * Specifies how whether to call the Clean${Target} target echo after calling the ${Target} target. Can be either yes or no. echo * Verbosity is q[uiet], m[inimal], n[ormal], d[etailed], echo or diag[nostic]. echo. echo If not specified, the following defaults are used. echo * Target: All echo * VisualStudioVersion: 15.0 echo * Clean: yes echo * Verbosity: normal