Newer
Older
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
@ECHO OFF
Rem Make sure we are in the directory containing the .bat script
cd %~dp0
Rem Go to the root directory
cd ..
Rem Created build/ if needed
if not exist build\ (
ECHO Generate build/ directory
ECHO mkdir build
mkdir build
) else (
ECHO Found existing build/ directory
)
ECHO.
ECHO Run CMake (from build/ directory)
ECHO ===============================
cd build/
cmake .. && (
ECHO.
ECHO ===============================
ECHO CMAKE Generated with success
ECHO The project can be loaded from the .sln file in build/ directory
ECHO.
) || (
ECHO.
ECHO ===============================
ECHO CMAKE Failed to generate the project
ECHO Please check the error indicated by CMAKE
ECHO.
)
Rem The previous command call cmake with the default target project
Rem Specific targets use -G option from cmake
Rem ex. cmake -G "Visual Studio 17 2020" ..
PAUSE