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

apple/foundationdb cmake/utils.cmake :96

protobuf_generate(
      TARGET ${target_name}
      PROTOC_OUT_DIR ${protoc_out_dir}
      GENERATE_EXTENSIONS .pb.h .pb.cc
      APPEND_PATH ${out_rel_path}
      PROTOS ${proto_files}
  )

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)