cmake protobuf_generate examples

Signatures

protobuf_generate(
  [TARGET <target>]
  [LANGUAGE <lang>]
  [OUT_VAR <variable>]
  [EXPORT_MACRO <macro>]
  [PROTOC_OUT_DIR <out-dir>]
  [PLUGIN <plugin>]
  [PLUGIN_OPTIONS <plugin-options>]
  [DEPENDENCIES <dependencies>...]
  [PROTOS <proto-files>...]
  [IMPORT_DIRS <dirs>...]
  [APPEND_PATH]
  [GENERATE_EXTENSIONS <extensions>...]
  [PROTOC_OPTIONS <options>...]
  [PROTOC_EXE <executable>]
  [DESCRIPTORS]
)

Examples

hust-diangroup/ns3-ai CMakeLists.txt :94

protobuf_generate(
        TARGET proto-objects
        IMPORT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/model/gym-interface"
        LANGUAGE cpp
        PROTOC_OUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/model/gym-interface/cpp"
)

google/filament third_party/dawn/third_party/protobuf/cmake/tests.cmake :25

protobuf_generate(
    PROTOS ${proto_file}
    LANGUAGE cpp
    OUT_VAR pb_generated_files
    IMPORT_DIRS ${protobuf_SOURCE_DIR}/src
  )

halide/Halide apps/onnx/CMakeLists.txt :35

protobuf_generate(
    TARGET oclib
    LANGUAGE cpp
    PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/_protoc_out
    IMPORT_DIRS ${onnx_SOURCE_DIR}
)

protocolbuffers/protobuf cmake/tests.cmake :25

protobuf_generate(
    PROTOS ${proto_file}
    LANGUAGE cpp
    OUT_VAR pb_generated_files
    IMPORT_DIRS ${protobuf_SOURCE_DIR}/src
  )

Bitcoin-ABC/bitcoin-abc src/qt/CMakeLists.txt :267

protobuf_generate(
		LANGUAGE cpp
		TARGET bitcoin-qt-protobuf
		IMPORT_DIRS "${PROTO_IMPORT_DIRECTORY}"
		PROTOC_OUT_DIR "${PROTOC_OUTPUT_DIRECTORY}"
	)

machinekit/machinekit-hal src/libraries/nanopb/CMakeLists.txt :72

protobuf_generate(
  LANGUAGE
  cpp
  PROTOC_OUT_DIR
  "${CMAKE_CURRENT_BINARY_DIR}"
  IMPORT_DIRS
  "${CMAKE_CURRENT_BINARY_DIR}"
  TARGET
  nanopb_proto_cc
  PROTOS
  ${SOURCE_NANOPB_PROTO_FILE}
  APPEND_PATH)