Hello world example for a cmake C++ project that includes a protobuf file.
apt install git cmake protobuf-compiler libprotobuf-dev
mkdir build && cd build
cmake ..
make
./bar
bar
should dump out a serialized protobuf message called baz in the current dir.