-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
49 lines (41 loc) · 1.28 KB
/
make.bat
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@ECHO OFF
set PROJECT_DIR=build\windows
set INSTALL_DIR=_bin\windows
if "%~1"=="" goto BLANK
if "%~1"=="debug" goto DEBUG
if "%~1"=="release" goto RELEASE
if "%~1"=="install" goto INSTALL
if "%~1"=="clean" goto CLEAN
if "%~1"=="rebuild" goto REBUILD
echo Invalid option "%~1"
goto :DONE
@ECHO ON
:BLANK
cmake -H. -B %PROJECT_DIR% -A "x64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
GOTO DONE
:DEBUG
cmake -H. -B %PROJECT_DIR% -A "x64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
cmake --build %PROJECT_DIR% --config Debug --target install
GOTO DONE
:RELEASE
cmake -H. -B %PROJECT_DIR% -A "x64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
cmake --build %PROJECT_DIR% --config Release --target install
GOTO DONE
:INSTALL
cmake -H. -B %PROJECT_DIR% -A "x64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
cmake --build %PROJECT_DIR% --config Debug --target install
cmake --build %PROJECT_DIR% --config Release --target install
GOTO DONE
:CLEAN
rmdir /Q /S %PROJECT_DIR% 2>NUL
rmdir /Q /S %INSTALL_DIR% 2>NUL
GOTO DONE
:REBUILD
rmdir /Q /S "build\Debug\" 2>NUL
rmdir /Q /S "build\PTVC_Project_GL.dir\" 2>NUL
del /q "build\PTVC_Project_GL.*" 2>NUL
del /q "build\CMakeCache.txt" 2>NUL
cmake -H. -B %PROJECT_DIR% -A "x64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
cmake --build %PROJECT_DIR% --config Debug --target ALL_BUILD
GOTO DONE
:DONE