72 lines
1.8 KiB
Batchfile
72 lines
1.8 KiB
Batchfile
@echo off
|
|
setlocal
|
|
|
|
set "CMAKE_EXE="
|
|
where cmake >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
set "CMAKE_EXE=cmake"
|
|
echo Found CMake in PATH
|
|
) else if exist "C:\Program Files\CMake\bin\cmake.exe" (
|
|
set "CMAKE_EXE=C:\Program Files\CMake\bin\cmake.exe"
|
|
echo Found CMake at C:\Program Files\CMake\bin\cmake.exe
|
|
) else (
|
|
echo Error: CMake not found!
|
|
echo Please install CMake or add it to PATH.
|
|
echo Download: https://cmake.org/download/
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo ======================================
|
|
echo EzUI Build Script
|
|
echo Building: x86/x64 Debug/Release
|
|
echo ======================================
|
|
echo.
|
|
|
|
echo [1/6] Configuring x86...
|
|
"%CMAKE_EXE%" -S . -B build_x86 -A Win32
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo [2/6] Building x86 Debug...
|
|
"%CMAKE_EXE%" --build build_x86 --config Debug --target EzUI
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo [3/6] Building x86 Release...
|
|
"%CMAKE_EXE%" --build build_x86 --config Release --target EzUI
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo [4/6] Configuring x64...
|
|
"%CMAKE_EXE%" -S . -B build_x64 -A x64
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo [5/6] Building x64 Debug...
|
|
"%CMAKE_EXE%" --build build_x64 --config Debug --target EzUI
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo [6/6] Building x64 Release...
|
|
"%CMAKE_EXE%" --build build_x64 --config Release --target EzUI
|
|
if %errorlevel% neq 0 goto error
|
|
|
|
echo.
|
|
echo ======================================
|
|
echo Build completed successfully!
|
|
echo ======================================
|
|
echo.
|
|
echo Output files:
|
|
echo lib\EzUI_Debug_Win32.lib
|
|
echo lib\EzUI_Release_Win32.lib
|
|
echo lib\EzUI_Debug_x64.lib
|
|
echo lib\EzUI_Release_x64.lib
|
|
echo.
|
|
pause
|
|
exit /b 0
|
|
|
|
:error
|
|
echo.
|
|
echo ======================================
|
|
echo Build failed!
|
|
echo ======================================
|
|
pause
|
|
exit /b 1
|