-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
53 lines (47 loc) · 1.15 KB
/
build.bat
File metadata and controls
53 lines (47 loc) · 1.15 KB
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
50
51
52
53
@echo off
setlocal enabledelayedexpansion
REM Check if default Conan profile exists
conan profile path default >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Default Conan profile not found. Creating one...
conan profile detect
if %ERRORLEVEL% neq 0 (
echo Failed to create default Conan profile.
pause
exit /b 1
)
echo Default Conan profile created successfully.
pause
) else (
echo Default Conan profile found.
)
if not exist build mkdir build
echo Running Conan install...
conan install . --output-folder=build --build=missing
if %ERRORLEVEL% neq 0 (
echo Conan install failed.
pause
exit /b 1
)
echo Conan install completed successfully.
pause
echo Configuring CMake...
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake
if %ERRORLEVEL% neq 0 (
echo CMake configuration failed.
pause
exit /b 1
)
echo CMake configuration completed successfully.
pause
echo Building project...
cmake --build build
if %ERRORLEVEL% neq 0 (
echo Build failed.
pause
exit /b 1
)
echo Build completed successfully.
pause
echo Build process finished.
pause