A C++ bRPC project template on Ubuntu built with:
- Install CMake.
Install dependencies.
sudo apt-get install -y libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
Clone and build bRPC.
git clone https://github.com/apache/brpc.git
cd brpc
sh config_brpc.sh --headers=/usr/include --libs=/usr/lib
make
Go to the project folder and run:
mkdir -p build
cd build
cmake -DBRPC_INSTALL_DIR=<brpc-path> ..
cmake --build .
<brpc-path>
is the output directory of brpc
(i.e., brpc/output
), where include
and lib
folders are located.
.
├── .clang-format
├── .gitignore
├── CITATION.cff
├── client
│ ├── client.cpp
│ └── CMakeLists.txt
├── CMakeLists.txt
├── .github
│ └── workflows
│ └── cmake.yaml
├── docs
│ └── badges
│ ├── C++.svg
│ ├── Linux.svg
│ ├── Made-with-CMake.svg
│ └── Made-with-GitHub-Actions.svg
├── LICENSE
├── proto
│ ├── echo.proto
│ └── msg.proto
├── README.md
└── server
├── CMakeLists.txt
└── server.cpp