-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_msvc2022_64bit_release.bat
More file actions
50 lines (35 loc) · 1.98 KB
/
build_msvc2022_64bit_release.bat
File metadata and controls
50 lines (35 loc) · 1.98 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
@echo off
setlocal enabledelayedexpansion
SET "CORELIB_ROOT=%~dp0"
SET "CORELIB_BOOST_ROOT=%CORELIB_ROOT%../ThirdParty/boost_1_90_0"
SET "CORELIB_BOOST_LIB=%CORELIB_ROOT%../ThirdParty/boost_1_90_0/lib64-msvc-14.3"
SET "CORELIB_BOOST_LIB_NAME_STUB=vc143-mt-x64-1_90"
SET "CORELIB_BOOST_LIB_NAME_STUB_D=vc143-mt-gd-x64-1_90"
SET "CORELIB_VCPKG_CMAKE_PATH=%CORELIB_ROOT%../ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake"
REM Setup environment.
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
REM Tidy previous installation/build folders.
del /s /q build\*.*
rmdir /s /q build
del /s /q bin\RelWithDebInfo\*.*
rmdir /s /q bin\RelWithDebInfo
mkdir bin\RelWithDebInfo\static
mkdir bin\RelWithDebInfo\dynamic
REM Create build files
cmake -G "Visual Studio 17 2022" -A x64 -T v143 -Bbuild -DCMAKE_TOOLCHAIN_FILE="%CORELIB_VCPKG_CMAKE_PATH%" -DVCPKG_TARGET_TRIPLET=x64-windows -DBUILD_SHARED_LIBS=ON -DCORELIB_USE_FLATBUFFERS=ON -DCORELIB_USE_STD_FILESYSTEM=ON -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO="/DEBUG:FULL /OPT:REF /OPT:ICF"
REM Perform build
cmake --build build --config RelWithDebInfo --target ALL_BUILD --parallel
REM copy files to bin64 output folder
copy .\build\RelWithDebInfo\CoreLibrary.dll /B .\bin\RelWithDebInfo\dynamic\CoreLibrary.dll
copy .\build\RelWithDebInfo\CoreLibrary.pdb /B .\bin\RelWithDebInfo\dynamic\CoreLibrary.pdb
del /s /q build\*.*
rmdir /s /q build
REM Create build files
cmake -G "Visual Studio 17 2022" -A x64 -T v143 -Bbuild -DBUILD_SHARED_LIBS=OFF -DCORELIB_USE_STD_FILESYSTEM=ON -DCMAKE_INSTALL_PREFIX=./ -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO="/DEBUG:FULL /OPT:REF /OPT:ICF"
REM Perform build
cmake --build build --config RelWithDebInfo --target ALL_BUILD --parallel
copy .\build\RelWithDebInfo\CoreLibrary.lib /B .\bin\RelWithDebInfo\static\CoreLibrary.lib
copy .\build\RelWithDebInfo\CoreLibrary.pdb /B .\bin\RelWithDebInfo\static\CoreLibrary.pdb
del /s /q build\*.*
rmdir /s /q build
endlocal