script:添加一个bat构建脚本。
This commit is contained in:
34
BuildRel.bat
Normal file
34
BuildRel.bat
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
where conan >nul 2>nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo conan not installed, pip install conan
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
conan install . -s build_type=Release --build=missing
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo install package failed.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
call %~dp0build\Release\generators\conanbuild.bat
|
||||||
|
cmake --preset=conan-release
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo config failed.
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
cmake --build --preset=conan-release
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo build failed.
|
||||||
|
cd ..
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo build success.
|
||||||
|
pause
|
||||||
@@ -8,6 +8,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/utf-8)
|
add_compile_options(/utf-8)
|
||||||
|
add_compile_options(/EHsc)
|
||||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||||
add_definitions(-D_WIN32_WINNT=0x0601)
|
add_definitions(-D_WIN32_WINNT=0x0601)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|||||||
Reference in New Issue
Block a user