-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
58 lines (51 loc) · 1.17 KB
/
build.bat
File metadata and controls
58 lines (51 loc) · 1.17 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
54
55
56
57
58
@echo off
REM Build script for ASCII Encoder and Decoder
echo Building ASCII Encoder and Decoder...
echo.
REM Check if VCPKG_ROOT is set
if not defined VCPKG_ROOT (
echo ERROR: VCPKG_ROOT environment variable is not set!
echo Please set it to your vcpkg installation directory.
echo.
echo Example:
echo set VCPKG_ROOT=C:\path\to\vcpkg
echo or permanently:
echo setx VCPKG_ROOT "C:\path\to\vcpkg"
echo.
pause
exit /b 1
)
echo Using vcpkg from: %VCPKG_ROOT%
echo.
REM Create build directory
if not exist build mkdir build
cd build
REM Configure with CMake
echo Configuring project...
cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
if %ERRORLEVEL% neq 0 (
echo.
echo ERROR: CMake configuration failed!
cd ..
pause
exit /b 1
)
echo.
echo Building project...
cmake --build . --config Release
if %ERRORLEVEL% neq 0 (
echo.
echo ERROR: Build failed!
cd ..
pause
exit /b 1
)
cd ..
echo.
echo ========================================
echo Build completed successfully!
echo ========================================
echo.
echo Output files are written to the out/ directory.
echo.
pause