| 1 |
@echo off |
| 2 |
setlocal |
| 3 |
cd /d %~dp0 |
| 4 |
|
| 5 |
if NOT "%CMAKE_COMMAND%" == "" goto pass_set_cmake |
| 6 |
call ..\ci_scripts\find_cmake.bat |
| 7 |
set OPT= |
| 8 |
:pass_set_cmake |
| 9 |
|
| 10 |
:retry_vs |
| 11 |
echo 1. Visual Studio 17 2022 Win32 |
| 12 |
echo 2. Visual Studio 17 2022 x64 |
| 13 |
echo 3. Visual Studio 16 2019 Win32 |
| 14 |
echo 4. Visual Studio 16 2019 x64 |
| 15 |
echo 5. Visual Studio 15 2017 |
| 16 |
echo 6. Visual Studio 14 2015 |
| 17 |
echo 7. Visual Studio 12 2013 |
| 18 |
echo 8. Visual Studio 11 2012 |
| 19 |
echo 9. Visual Studio 10 2010 |
| 20 |
echo a. Visual Studio 9 2008 |
| 21 |
rem echo b. Visual Studio 8 2005 |
| 22 |
rem echo c. Visual Studio NMake (experimental) |
| 23 |
rem echo d. Cygwin MinGW Release + Unix Makefiles (experimental) |
| 24 |
set /p no="select no " |
| 25 |
|
| 26 |
echo %no% |
| 27 |
if "%no%" == "1" set GENERATOR="Visual Studio 17 2022" & set OPT=-DARCHITECTURE=32 & goto build_all |
| 28 |
if "%no%" == "2" set GENERATOR="Visual Studio 17 2022" & set OPT=-DARCHITECTURE=64 & goto build_all |
| 29 |
if "%no%" == "3" set GENERATOR="Visual Studio 16 2019" & set OPT=-DARCHITECTURE=32 & goto build_all |
| 30 |
if "%no%" == "4" set GENERATOR="Visual Studio 16 2019" & set OPT=-DARCHITECTURE=64 & goto build_all |
| 31 |
if "%no%" == "5" set GENERATOR="Visual Studio 15 2017" & goto build_all |
| 32 |
if "%no%" == "6" set GENERATOR="Visual Studio 14 2015" & goto build_all |
| 33 |
if "%no%" == "7" set GENERATOR="Visual Studio 12 2013" & goto build_all |
| 34 |
if "%no%" == "8" set GENERATOR="Visual Studio 11 2012" & goto build_all |
| 35 |
if "%no%" == "9" set GENERATOR="Visual Studio 10 2010" & goto build_all |
| 36 |
if "%no%" == "a" set GENERATOR="Visual Studio 9 2008" & goto build_all |
| 37 |
if "%no%" == "b" set GENERATOR="Visual Studio 8 2005" & call :cmake_3_11_4 & goto build_all_2 |
| 38 |
if "%no%" == "c" set GENERATOR="NMake Makefiles" & set OPT=-DCMAKE_BUILD_TYPE=Release & goto build_all |
| 39 |
if "%no%" == "d" set GENERATOR="Unix Makefiles" & set OPT=-DCMAKE_TOOLCHAIN_FILE=../mingw.toolchain.cmake & goto build_all |
| 40 |
echo ? retry |
| 41 |
goto retry_vs |
| 42 |
|
| 43 |
:build_all |
| 44 |
if exist "%CMAKE_COMMAND%" goto build_all_2 |
| 45 |
where "%CMAKE_COMMAND%" 2> nul |
| 46 |
if %errorlevel% == 0 goto build_all_2 |
| 47 |
echo cmake not found |
| 48 |
pause |
| 49 |
exit |
| 50 |
|
| 51 |
:build_all_2 |
| 52 |
set C="%CMAKE_COMMAND%" -DCMAKE_GENERATOR=%GENERATOR% %OPT% -P buildall.cmake |
| 53 |
echo %C% |
| 54 |
title %C% |
| 55 |
pause |
| 56 |
%C% |
| 57 |
|
| 58 |
:finish |
| 59 |
echo build complete |
| 60 |
endlocal |
| 61 |
pause |
| 62 |
exit |
| 63 |
|
| 64 |
:cmake_3_11_4 |
| 65 |
set CMAKE_COMMAND=%~dp0..\buildtools\cmake-3.11.4-win32-x86\bin\cmake.exe |
| 66 |
echo 1. PATH����cmake.exe���g�p���� |
| 67 |
echo 2. VS2005�����g�p������cmake�g�p���� |
| 68 |
echo (�K�v�����������_�E�����[�h�����A����buildtools/���C���X�g�[������) |
| 69 |
if exist %CMAKE_COMMAND% echo �C���X�g�[������(%CMAKE_COMMAND%) |
| 70 |
|
| 71 |
set /p no="select no " |
| 72 |
echo %no% |
| 73 |
if "%no%" == "2" goto download |
| 74 |
|
| 75 |
set CMAKE_COMMAND="cmake.exe" |
| 76 |
where %CMAKE_COMMAND% |
| 77 |
goto finish_cmake |
| 78 |
|
| 79 |
:download |
| 80 |
if exist %CMAKE_COMMAND% goto finish_cmake |
| 81 |
call ..\buildtools\getcmake.bat |
| 82 |
|
| 83 |
:finish_cmake |
| 84 |
exit /b |