Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivansafonov/grpc-cmake-example
gRPC C++ example with CMake
https://github.com/ivansafonov/grpc-cmake-example
c-plus-plus cmake grpc protobuf
Last synced: about 1 month ago
JSON representation
gRPC C++ example with CMake
- Host: GitHub
- URL: https://github.com/ivansafonov/grpc-cmake-example
- Owner: IvanSafonov
- License: mit
- Created: 2017-02-04T11:21:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T17:21:48.000Z (about 6 years ago)
- Last Synced: 2024-12-07T16:04:26.306Z (about 2 months ago)
- Topics: c-plus-plus, cmake, grpc, protobuf
- Language: CMake
- Homepage:
- Size: 12.7 KB
- Stars: 194
- Watchers: 4
- Forks: 53
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tested on Ubuntu 18.04 LTS
## How to build
* Install [Protocol Buffers](https://github.com/google/protobuf/blob/master/src/README.md) and [gRPC](https://github.com/grpc/grpc/tree/master/src/cpp)
```bash
# On ubuntu 18.04
sudo apt-get install build-essential autoconf libtool pkg-config automake curl
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
# Build and install protobuf
cd ./third_party/protobuf
./autogen.sh
./configure --prefix=/opt/protobuf
make -j `nproc`
sudo make install
# Build and install gRPC
cd ../..
make -j `nproc` PROTOC=/opt/protobuf/bin/protoc
sudo make prefix=/opt/grpc install```
* Change CMAKE_PREFIX_PATH variable in CMakeFiles.txt[7] according to your install prefixes
* And build it
```bash
mkdir build
cd build
cmake ..
make
```