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

iree-org/iree integrations/pjrt/cmake/protobuf_cc_library.cmake :67

protobuf_generate(
    TARGET ${_NAME}
    LANGUAGE cpp
    PROTOC_OPTIONS ${_RULE_PROTOC_ARGS}
    IMPORT_DIRS
      ${protobuf_SOURCE_DIR}/src
      ${CMAKE_CURRENT_SOURCE_DIR}
  )