580 B
580 B
Generating source code
First, you need install protobuf.
on Mac
brew install protobuf
on Ubuntu
apt-get install protobuf
on CentOS
yum install protobuf
Second, you need install or compile struct_pb protoc plugin protoc-gen-struct_pb
.
Finally, you can use the following command to generate the code.
protoc --plugin=protoc-gen-struct_pb --struct_pb_out . xxx.proto
or use the helper function on your CMakeLists.txt
find_package(Protobuf)
protobuf_generate_struct_pb(PROTO_SRCS PROTO_HDRS xxxx.proto)