/
setup.bat
51 lines (32 loc) · 1.7 KB
/
setup.bat
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
51
@echo off
@echo off
for /f "usebackq tokens=1* delims=: " %%i in (`vswhere -latest -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" set InstallDir=%%j
)
IF NOT EXIST build mkdir build
cd build
IF NOT EXIST ThirdParty mkdir ThirdParty
IF "%1" == "-hatchit" (
cmake ..\\ -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0 -DBUILD_SHARED_LIBS=ON
)
IF NOT "%1" == "-hatchit" (
cd ThirdParty
if "%1" == "-winrt" (
cmake ..\\..\\ThirdParty -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_NAME:STRING=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING=10.0 -DBUILD_SHARED_LIBS=ON -DBUILD_WINRT=ON
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ThirdPartyLibs.sln /p:Configuration=Debug
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ThirdPartyLibs.sln /p:Configuration=Release
)
cd ..
cmake ..\\ -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_NAME:STRING=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING=10.0 -DBUILD_SHARED_LIBS=ON -DBUILD_WINRT=ON
)
if NOT "%1" == "-winrt" (
cmake ..\\..\\ThirdParty -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION:STRING=10.0 -DBUILD_SHARED_LIBS=ON -DBUILD_WINRT=OFF
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ThirdPartyLibs.sln /p:Configuration=Debug
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ThirdPartyLibs.sln /p:Configuration=Release
)
cd ..
cmake ..\\ -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION:STRING=10.0 -DBUILD_SHARED_LIBS=ON -DBUILD_WINRT=OFF
)
)