-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathinstall-deps.sh
29 lines (28 loc) · 1.14 KB
/
install-deps.sh
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
#!/bin/sh
# compile & install
mkdir deps && cd deps
# -> anyrpc
git clone --recursive https://github.com/sgieseking/anyrpc.git
cd anyrpc && mkdir build && cd build
if [[ $RUNNER_OS == "Windows" ]]; then
cmake -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE -DBUILD_EXAMPLES=OFF -DBUILD_WITH_LOG4CPLUS=OFF -DANYRPC_LIB_BUILD_SHARED=${SHARED_LIBS} ..
cmake --build . --target install --config $CI_BUILD_TYPE
else
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE -DBUILD_EXAMPLES=OFF -DBUILD_WITH_LOG4CPLUS=OFF -DANYRPC_LIB_BUILD_SHARED=${SHARED_LIBS} ..
sudo cmake --build . --target install --config $CI_BUILD_TYPE
fi
# leave anyrpc
cd ../..
# -> googletest
git clone --recursive https://github.com/google/googletest.git
cd googletest && mkdir build && cd build
if [[ $RUNNER_OS == "Windows" ]]; then
cmake -G"Visual Studio 17 2022" -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE ..
cmake --build . --target install --config $CI_BUILD_TYPE
else
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE ..
sudo cmake --build . --target install --config $CI_BUILD_TYPE
fi
cd ../..
# leave deps
cd ..