-
Notifications
You must be signed in to change notification settings - Fork 130
/
build_libs_windows.bat
127 lines (92 loc) · 4.38 KB
/
build_libs_windows.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@set ROOT=%cd%
@echo root= %ROOT%
git submodule update --init --recursive
pushd third_party\gflags
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DCMAKE_DEBUG_POSTFIX="" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%/third_party/gflags/build_cmake/local_install ..
cmake --build . --target ALL_BUILD --config Debug
cmake --build . --target INSTALL --config Release
mkdir local_install\lib\Release
mkdir local_install\lib\Debug
copy lib\Release local_install\lib\Release
copy lib\Debug local_install\lib\Debug
popd
cd %ROOT%
pushd third_party\glog
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DCMAKE_DEBUG_POSTFIX="" -DINSTALL_LIBS=ON -Dgflags_DIR=%ROOT%/third_party/gflags/build_cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%\third_party\glog\build_cmake\local_install ..
cmake --build . --target ALL_BUILD --config Debug
cmake --build . --target INSTALL --config Release
mkdir local_install\lib\Release
mkdir local_install\lib\Debug
copy Release local_install\lib\Release
copy Debug local_install\lib\Debug
popd
cd %ROOT%
pushd third_party\cppadcodegen
git apply ..\patches\CppADCodeGen.diff
popd
cd %ROOT%
pushd third_party\eigen3
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DCMAKE_DEBUG_POSTFIX="" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=local_install ..
cmake --build . --target INSTALL --config Release
popd
cd %ROOT%
rem pushd third_party\bullet3
rem mkdir build_cmake
rem cd build_cmake
rem cmake -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON -DCMAKE_CXX_FLAGS="/MP" -DUSE_DOUBLE_PRECISION=ON -DCMAKE_DEBUG_POSTFIX="" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=local_install ..
rem cmake --build . --target ALL_BUILD --config Debug
rem cmake --build . --target INSTALL --config Release
rem mkdir local_install\lib\Release
rem mkdir local_install\lib\Debug
rem copy lib\Release local_install\lib\Release
rem copy lib\Debug local_install\lib\Debug
rem popd
rem cd %ROOT%
rem pushd third_party\ceres-solver
rem mkdir build_cmake
rem cd build_cmake
rem cmake -DCMAKE_CXX_FLAGS="/MP" -DBUILD_EXAMPLES=OFF -DBUILD_BENCHMARKS=OFF -DBUILD_TESTING=OFF -Dgflags_DIR=%ROOT%/third_party/gflags/build_cmake -Dglog_DIR=%ROOT%/third_party/glog/build_cmake -DEigen3_DIR=%ROOT%/third_party/eigen3/build_cmake -DCMAKE_DEBUG_POSTFIX="" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%/third_party/ceres-solver/build_cmake/local_install ..
rem cmake --build . --target ALL_BUILD --config Debug
rem cmake --build . --target INSTALL --config Release
rem mkdir local_install\lib\Release
rem mkdir local_install\lib\Debug
rem copy lib\Release local_install\lib\Release
rem copy lib\Debug local_install\lib\Debug
rem popd
rem cd %ROOT%
rem del third_party\ceres-solver\build_cmake\local_install\lib\*.lib
rem del third_party\bullet3\build_cmake\local_install\lib\*.lib
del third_party\glog\build_cmake\local_install\lib\*.lib
del third_party\gflags\build_cmake\local_install\lib\*.lib
pushd third_party\boost
call bootstrap.bat
b2 --with-serialization
popd
cd %ROOT%
pushd third_party\osqp
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DCMAKE_DEBUG_POSTFIX="d" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%\third_party\osqp\build_cmake\local_install ..
cmake --build . --target INSTALL --config Debug
cmake --build . --target INSTALL --config Release
popd
cd %ROOT%
pushd third_party\qpoases
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DCMAKE_DEBUG_POSTFIX="d" -DINSTALL_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=%ROOT%\third_party\qpoases\build_cmake\local_install ..
cmake --build . --target INSTALL --config Debug
cmake --build . --target INSTALL --config Release
popd
cd %ROOT%
mkdir build_cmake
cd build_cmake
cmake -DCMAKE_CXX_FLAGS="/MP" -DUSE_CERES=OFF -DUSE_OSQP=ON -Dosqp_DIR=%ROOT%\third_party\osqp\build_cmake -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON -Dgflags_DIR=%ROOT%\third_party\gflags\build_cmake -Dglog_DIR=%ROOT%\third_party\glog\build_cmake -DEigen3_DIR=%ROOT%\third_party\eigen3\build_cmake -DUSE_CPPAD=ON -DPAGMO_WITH_EIGEN3=ON -DBoost_DIR:PATH=%ROOT%/third_party/boost/stage/lib/cmake/Boost-1.75.0 -DTBB_VERSION=2021.1.0 ..
rem cmake --build . --target INSTALL --config Release
rem start DIFF_PHYSICS.sln