From f4dc24b527fc4a1b2809a78868a0c4f1a77db3cd Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Oct 2024 11:09:36 -0400 Subject: [PATCH] FindProtobuf: Clarify protobuf_generate options documentation --- Modules/FindProtobuf.cmake | 78 ++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 197e71f961..5c6b37257e 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -108,20 +108,27 @@ Example: Add custom commands to process ``.proto`` files to C++:: - protobuf_generate_cpp ( - [DESCRIPTORS ] [EXPORT_MACRO ] [...]) + protobuf_generate_cpp ( + + [DESCRIPTORS ] + [EXPORT_MACRO ] + [...]) - ``SRCS`` + ```` Variable to define with autogenerated source files - ``HDRS`` + + ```` Variable to define with autogenerated header files - ``DESCRIPTORS`` + + ``DESCRIPTORS `` .. versionadded:: 3.10 Variable to define with autogenerated descriptor files, if requested. - ``EXPORT_MACRO`` + + ``EXPORT_MACRO `` is a macro which should expand to ``__declspec(dllexport)`` or ``__declspec(dllimport)`` depending on what is being compiled. - ``ARGN`` + + ``...`` ``.proto`` files .. command:: protobuf_generate_python @@ -130,11 +137,12 @@ Example: Add custom commands to process ``.proto`` files to Python:: - protobuf_generate_python ( [...]) + protobuf_generate_python ( [...]) - ``PY`` + ```` Variable to define with autogenerated Python files - ``ARGN`` + + ``...`` ``.proto`` files .. command:: protobuf_generate @@ -146,59 +154,71 @@ Example: protobuf_generate ( TARGET [LANGUAGE ] - [OUT_VAR ] + [OUT_VAR ] [EXPORT_MACRO ] [PROTOC_OUT_DIR ] [PLUGIN ] - [PLUGIN_OPTIONS ] - [DEPENDENCIES ] - [IMPORT_DIRS ] - [GENERATE_EXTENSIONS ] - [PROTOC_OPTIONS ] + [PLUGIN_OPTIONS ] + [DEPENDENCIES ] + [PROTOS ...] + [IMPORT_DIRS ...] + [GENERATE_EXTENSIONS ...] + [PROTOC_OPTIONS