BuildAllTargets.cmd 981 B

12345678910111213141516171819202122232425262728293031323334
  1. @rem
  2. @rem PROJECT: Mouri Internal Library Essentials
  3. @rem FILE: BuildAllTargets.cmd
  4. @rem PURPOSE: Build all targets script for Visual Studio C++ Project
  5. @rem
  6. @rem LICENSE: The MIT License
  7. @rem
  8. @rem DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
  9. @rem
  10. @setlocal
  11. @echo off
  12. rem Change to the current folder.
  13. cd "%~dp0"
  14. rem Remove the output folder for a fresh compile.
  15. rd /s /q Output
  16. set VisualStudioInstallerFolder="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
  17. if %PROCESSOR_ARCHITECTURE%==x86 set VisualStudioInstallerFolder="%ProgramFiles%\Microsoft Visual Studio\Installer"
  18. pushd %VisualStudioInstallerFolder%
  19. for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
  20. set VisualStudioInstallDir=%%i
  21. )
  22. popd
  23. call "%VisualStudioInstallDir%\VC\Auxiliary\Build\vcvarsall.bat" x86
  24. rem Build all targets
  25. MSBuild -m BuildAllTargets.proj
  26. @endlocal