forked from nfultz/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
29 lines (25 loc) · 828 Bytes
/
install
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
export GRPC_INSTALL_DIR=$HOME/.local
mkdir -p $GRPC_INSTALL_DIR
export PATH="$GRPC_INSTALL_DIR/bin:$PATH"
sudo apt install -y cmake
sudo apt install -y build-essential autoconf libtool pkg-config
LATEST_VER=$(curl -L "https://api.github.com/repos/grpc/grpc/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
git clone --recurse-submodules -b $LATEST_VER https://github.com/grpc/grpc grpc_base
cd grpc_base
mkdir -p cmake/build
pushd cmake/build
cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR \
../..
make -j4
sudo make install
popd
mkdir -p third_party/abseil-cpp/cmake/build
pushd third_party/abseil-cpp/cmake/build
cmake -DCMAKE_INSTALL_PREFIX=$GRPC_INSTALL_DIR \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
../..
make -j4
sudo make install
popd