-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreateNinja32_vs15.bat
86 lines (71 loc) · 2.8 KB
/
createNinja32_vs15.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@echo off
Setlocal EnableDelayedExpansion
SET BASE_DIR=%~dp0
SET NINJA=ninja
SET VS_VERSION=15
SET VS_PREFIX=vs%VS_VERSION%
call vs15 x86
SET NINJA_OPTS=-DCMAKE_CXX_COMPILER:FILEPATH=cl.exe -DCMAKE_C_COMPILER:FILEPATH=cl.exe
SET CMAKE="%ProgramFiles%\CMake\bin\cmake.exe"
SET CPACK="%ProgramFiles%\CMake\bin\cpack.exe"
if not exist %BASE_DIR%\dist mkdir %BASE_DIR%\dist
::
:: Build release static runtime version
::
SET WITH_STATIC_RUNTIME=ON
SET CMAKE_BUILD_TYPE=Release
SET VARIANT=%VS_PREFIX%_release_x86_static
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
if not exist %BASE_DIR%\%VARIANT% mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
%CMAKE% -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
%CPACK% -G ZIP
move "libSBML Dependencies-1.0.0-b1-win32.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build release dynamic runtime version
::
SET WITH_STATIC_RUNTIME=OFF
SET CMAKE_BUILD_TYPE=Release
SET VARIANT=%VS_PREFIX%_release_x86
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
if not exist %BASE_DIR%\%VARIANT% mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
%CMAKE% -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
%CPACK% -G ZIP
move "libSBML Dependencies-1.0.0-b1-win32.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build debug static runtime version
::
SET WITH_STATIC_RUNTIME=ON
SET CMAKE_BUILD_TYPE=Debug
SET VARIANT=%VS_PREFIX%_debug_x86_static
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
if not exist %BASE_DIR%\%VARIANT% mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
%CMAKE% -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
%CPACK% -G ZIP
move "libSBML Dependencies-1.0.0-b1-win32.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build debug dynamic runtime version
::
SET WITH_STATIC_RUNTIME=OFF
SET CMAKE_BUILD_TYPE=Debug
SET VARIANT=%VS_PREFIX%_debug_x86
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
if not exist %BASE_DIR%\%VARIANT% mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
%CMAKE% -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
%CPACK% -G ZIP
move "libSBML Dependencies-1.0.0-b1-win32.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd