-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.sh
executable file
·59 lines (49 loc) · 1.36 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
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
#!/bin/bash
cd "`dirname $0`"
INSTALL_DIR="`pwd`/_install"
BUILD_DIR="`pwd`/_build"
mkdir -p $BUILD_DIR
mkdir -p $INSTALL_DIR
go install github.com/golang/protobuf/protoc-gen-go
# protoc
PROTOC_VERSION="24.4"
_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip"
_FILE="protoc-$PROTOC_VERSION-linux-x86_64.zip"
pushd $BUILD_DIR
if [ ! -e $_FILE ]; then
curl -Lo $_FILE $_URL
fi
rm -rf $INSTALL_DIR/protoc
mkdir -p $INSTALL_DIR/protoc
unzip $_FILE -d $INSTALL_DIR/protoc
popd
# Boost
BOOST_VERSION="1.82.0"
_BOOST_UNDERSCORE_VERSION=${BOOST_VERSION//./_}
_URL="https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${_BOOST_UNDERSCORE_VERSION}.zip"
_FILE="boost_${_BOOST_UNDERSCORE_VERSION}.zip"
pushd $BUILD_DIR
if [ ! -e $_FILE ]; then
curl -Lo $_FILE $_URL
fi
rm -rf boost_${_BOOST_UNDERSCORE_VERSION}
unzip $_FILE
pushd boost_${_BOOST_UNDERSCORE_VERSION}
./bootstrap.sh
./b2 install \
--prefix=$INSTALL_DIR/boost \
--build-dir=$BUILD_DIR/boost-build \
--with-filesystem \
--with-program_options \
--with-json \
target-os=linux \
address-model=64 \
variant=release \
link=static
popd
popd
# nlohmann::json
pushd $INSTALL_DIR
rm -rf json
git clone https://github.com/nlohmann/json.git
popd