-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
52 lines (45 loc) · 1.25 KB
/
build.bat
File metadata and controls
52 lines (45 loc) · 1.25 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
@echo off
chcp 65001 >nul
echo OpenGL Practice Project Build Script
echo ===================================
REM Create build directory
if not exist build mkdir build
cd build
REM Check vcpkg path (modify this path as needed)
set VCPKG_PATH=C:\vcpkg
if not exist "%VCPKG_PATH%" (
echo WARNING: vcpkg not found at %VCPKG_PATH%
echo Please check your vcpkg path or manually set CMAKE_TOOLCHAIN_FILE
echo.
echo If you don't have vcpkg installed:
echo 1. Install vcpkg from: https://github.com/Microsoft/vcpkg
echo 2. Run: vcpkg install glfw3:x64-windows glad:x64-windows
echo 3. Update VCPKG_PATH in this script
pause
exit /b 1
)
REM Configure CMake
echo Configuring CMake...
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=%VCPKG_PATH%/scripts/buildsystems/vcpkg.cmake
if %ERRORLEVEL% neq 0 (
echo CMake configuration failed. Please check your vcpkg setup.
pause
exit /b 1
)
REM Build
echo Building...
cmake --build . --config Release
if %ERRORLEVEL% neq 0 (
echo Build failed.
pause
exit /b 1
)
echo.
echo Build completed successfully!
echo You can find executables in the Release folder:
echo - 01_window.exe
echo - 02_triangle.exe
echo - 03_shaders.exe
echo - 04_textures.exe
echo.
pause