asio-grpc v1.4.0
Asynchronous gRPC with Asio/unified executors
CMake protobuf generate

In the same directory that called find_package(asio-grpc) a CMake function will be made available that can be used to generate gRPC source files from .proto schemas.

If you are using cmake-format then you can copy the asio_grpc_protobuf_generate section from cmake-format.yaml into your cmake-format.yaml to get proper formatting.

#[=======================================================================[.rst:
asio_grpc_protobuf_generate
------------
Add custom commands to process ``.proto`` files to C++::
asio_grpc_protobuf_generate(PROTOS <proto_file1> [<proto_file2>...]
[OUT_DIR <output_directory>]
[OUT_VAR <output_variable>]
[TARGET <target>]
[USAGE_REQUIREMENT PRIVATE|PUBLIC|INTERFACE]
[IMPORT_DIRS <directories>...]
[EXTRA_ARGS <arguments>...]
[GENERATE_GRPC]
[GENERATE_DESCRIPTORS])
``PROTOS``
``.proto`` files
``OUT_DIR``
Generated files output directory. Default: CMAKE_CURRENT_BINARY_DIR
``OUT_VAR``
Variable to define with generated source files
``TARGET``
Add generated source files to target.
``USAGE_REQUIREMENT``
How to add sources to ``<target>``: ``PRIVATE``, ``PUBLIC``, ``INTERFACE``
Default: ``PRIVATE``
``IMPORT_DIRS``
Import directories to be added to the protoc command line. If unspecified
then the directory of each .proto file will be used.
``EXTRA_ARGS``
Additional protoc command line arguments
``GENERATE_GRPC``
Generate grpc files
``GENERATE_DESCRIPTORS``
Generate descriptor files named <proto_file_base_name>.desc
#]=======================================================================]