Files
YYCCommonplace/script/win_build.old.bat
T

57 lines
1.4 KiB
Batchfile
Raw Normal View History

2024-06-20 15:47:15 +08:00
@ECHO OFF
:: Check environment
2024-06-20 15:47:15 +08:00
SET README_PATH=%CD%\README.md
IF EXIST %README_PATH% (
REM DO NOTHING
) ELSE (
ECHO Error: You must run this script at the root folder of this project!
EXIT /b
)
2024-07-22 13:56:00 +08:00
:: Create main binary directory
2024-06-20 15:47:15 +08:00
MKDIR bin
CD bin
2024-07-22 13:56:00 +08:00
:: Create build folder
2024-06-20 15:47:15 +08:00
MKDIR Win32
MKDIR x64
2024-07-06 15:28:30 +08:00
MKDIR documentation
2024-07-22 13:56:00 +08:00
:: Create install folder
2024-06-20 15:47:15 +08:00
MKDIR install
2024-07-22 13:56:00 +08:00
CD install
MKDIR Win32_Debug
MKDIR Win32_Release
MKDIR x64_Debug
MKDIR x64_Release
CD ..
2024-06-20 15:47:15 +08:00
:: Build for Win32
CD Win32
cmake -G "Visual Studio 16 2019" -A Win32 -DYYCC_BUILD_TESTBENCH=ON ../..
cmake --build . --config Debug
2024-07-22 13:56:00 +08:00
cmake --install . --prefix=../install/Win32_Debug --config Debug
2024-06-20 15:47:15 +08:00
cmake --build . --config Release
2024-07-22 13:56:00 +08:00
cmake --install . --prefix=../install/Win32_Release --config Release
2024-06-20 15:47:15 +08:00
CD ..
:: Build for x64
CD x64
cmake -G "Visual Studio 16 2019" -A x64 -DYYCC_BUILD_TESTBENCH=ON ../..
cmake --build . --config Debug
2024-07-22 13:56:00 +08:00
cmake --install . --prefix=../install/x64_Debug --config Debug
2024-06-20 15:47:15 +08:00
cmake --build . --config Release
2024-07-22 13:56:00 +08:00
cmake --install . --prefix=../install/x64_Release --config Release
2024-06-20 15:47:15 +08:00
CD ..
2024-07-06 15:28:30 +08:00
:: Build for documentation
IF NOT "%1"=="NODOC" (
CD documentation
cmake -G "Visual Studio 16 2019" -A x64 -DYYCC_BUILD_DOC=ON ../..
cmake --build . --config Release
cmake --build . --target YYCCDocumentation
cmake --install . --prefix=../install/x64_Release --config Release
CD ..
)
2024-07-06 15:28:30 +08:00
2024-07-22 13:56:00 +08:00
:: Exit to original path
CD ..
ECHO Windows CMake Build Done