44 lines
1010 B
Batchfile
44 lines
1010 B
Batchfile
@echo off
|
|
REM Build script for simple-example project only
|
|
REM Usage: scripts\build.bat [Release|Debug]
|
|
|
|
setlocal
|
|
|
|
REM Default to Debug build if not specified
|
|
set BUILD_TYPE=%1
|
|
if "%BUILD_TYPE%"=="" set BUILD_TYPE=Debug
|
|
|
|
echo ==========================================
|
|
echo Building simple-example (%BUILD_TYPE%)
|
|
echo ==========================================
|
|
echo.
|
|
|
|
REM Build only the simple-example target
|
|
cmake --build build --config %BUILD_TYPE% --target simple-example
|
|
|
|
if %ERRORLEVEL% EQU 0 (
|
|
echo.
|
|
echo Build successful!
|
|
echo.
|
|
echo Executable location:
|
|
if "%BUILD_TYPE%"=="Release" (
|
|
echo build\bin\simple-example.exe
|
|
) else (
|
|
echo build\bin\simple-example_d.exe
|
|
)
|
|
echo.
|
|
echo Run with:
|
|
if "%BUILD_TYPE%"=="Release" (
|
|
echo .\build\bin\simple-example.exe
|
|
) else (
|
|
echo .\build\bin\simple-example_d.exe
|
|
)
|
|
) else (
|
|
echo.
|
|
echo Build failed!
|
|
exit /b 1
|
|
)
|
|
|
|
endlocal
|
|
|