Use CMake to build targets.
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PWD}"
cmake --build build --target all -- --jobs=4
cmake --build build --target install
Read a file into protobuf messages and write protobuf messages to another file.
$ ./protobuf_rw_file photo.jpg photo-copy.jpg