-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMake.bat
More file actions
35 lines (31 loc) · 786 Bytes
/
Copy pathMake.bat
File metadata and controls
35 lines (31 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
setlocal
echo.
echo [Arguments Help]
echo.
echo 26: Choose Visual Studio 2026. (VS 2022 is default)
echo -c: Delete the CMake-generated files.
echo.
echo.
set CLEAN=false
set Generator="Visual Studio 17 2022"
set SolutionEntry="PillowBasics.sln"
for %%i in (%*) do (
if "%%i"=="-c" set CLEAN=true
if "%%i"=="26" (
set Generator = "Visual Studio 18 2026"
set SolutionEntry="PillowBasics.slnx"
)
)
:: Delete stale CMake files.
if "%CLEAN%"=="true" (
echo Deleting stale CMake files...
rd /s/q Cmake
)
echo.
:: Generate.
cmake -G %Generator% -DCMAKE_TOOLCHAIN_FILE=./ToolchainWin64.cmake -S ./SourceCode -B ./Cmake/Win64
:: Open the solution.
echo.
set /p input=Open the solution? (y/n)
if /i "%input%"=="y" start ./Cmake/Win64/%SolutionEntry%