protobuf/5.27.0

Protocol Buffers - Google's data interchange format
Recipe info
2024-05-29

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
protobuf/5.27.0

Using protobuf

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
protobuf/5.27.0
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("protobuf/5.27.0")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): protobuf (config), Protobuf (module)
  • CMake target name(s): protobuf::protobuf
  • libprotoc => protobuf::libprotoc
    utf8_range => utf8_range::utf8_range
    libprotobuf => protobuf::libprotobuf
    utf8_validity => utf8_range::utf8_validity
    
  • pkg-config file name(s): protobuf_full_package.pc
  • libprotoc => protobuf-libprotoc.pc
    utf8_range => protobuf-utf8_range.pc
    libprotobuf => protobuf.pc
    utf8_validity => protobuf-utf8_validity.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(protobuf REQUIRED)
# ...
target_link_libraries(YOUR_TARGET protobuf::protobuf)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the protobuf homepage listed above:

#include "google/protobuf/any.h"
#include "google/protobuf/any.pb.h"
#include "google/protobuf/any.proto"
#include "google/protobuf/api.pb.h"
#include "google/protobuf/api.proto"
#include "google/protobuf/arena.h"
#include "google/protobuf/arena_align.h"
#include "google/protobuf/arena_allocation_policy.h"
#include "google/protobuf/arena_cleanup.h"
#include "google/protobuf/arenastring.h"
#include "google/protobuf/arenaz_sampler.h"
#include "google/protobuf/compiler/code_generator.h"
#include "google/protobuf/compiler/command_line_interface.h"
#include "google/protobuf/compiler/cpp/enum.h"
#include "google/protobuf/compiler/cpp/extension.h"
#include "google/protobuf/compiler/cpp/field.h"
#include "google/protobuf/compiler/cpp/field_generators/generators.h"
#include "google/protobuf/compiler/cpp/file.h"
#include "google/protobuf/compiler/cpp/generator.h"
#include "google/protobuf/compiler/cpp/helpers.h"
#include "google/protobuf/compiler/cpp/ifndef_guard.h"
#include "google/protobuf/compiler/cpp/message.h"
#include "google/protobuf/compiler/cpp/message_layout_helper.h"
#include "google/protobuf/compiler/cpp/names.h"
#include "google/protobuf/compiler/cpp/namespace_printer.h"
#include "google/protobuf/compiler/cpp/options.h"
#include "google/protobuf/compiler/cpp/padding_optimizer.h"
#include "google/protobuf/compiler/cpp/parse_function_generator.h"
#include "google/protobuf/compiler/cpp/service.h"
#include "google/protobuf/compiler/cpp/tracker.h"
#include "google/protobuf/compiler/csharp/csharp_doc_comment.h"
#include "google/protobuf/compiler/csharp/csharp_enum.h"
#include "google/protobuf/compiler/csharp/csharp_enum_field.h"
#include "google/protobuf/compiler/csharp/csharp_field_base.h"
#include "google/protobuf/compiler/csharp/csharp_generator.h"
#include "google/protobuf/compiler/csharp/csharp_helpers.h"
#include "google/protobuf/compiler/csharp/csharp_map_field.h"
#include "google/protobuf/compiler/csharp/csharp_message.h"
#include "google/protobuf/compiler/csharp/csharp_message_field.h"
#include "google/protobuf/compiler/csharp/csharp_options.h"
#include "google/protobuf/compiler/csharp/csharp_primitive_field.h"
#include "google/protobuf/compiler/csharp/csharp_reflection_class.h"
#include "google/protobuf/compiler/csharp/csharp_repeated_enum_field.h"
#include "google/protobuf/compiler/csharp/csharp_repeated_message_field.h"
#include "google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h"
#include "google/protobuf/compiler/csharp/csharp_source_generator_base.h"
#include "google/protobuf/compiler/csharp/csharp_wrapper_field.h"
#include "google/protobuf/compiler/csharp/names.h"
#include "google/protobuf/compiler/importer.h"
#include "google/protobuf/compiler/java/context.h"
#include "google/protobuf/compiler/java/doc_comment.h"
#include "google/protobuf/compiler/java/field_common.h"
#include "google/protobuf/compiler/java/file.h"
#include "google/protobuf/compiler/java/full/enum.h"
#include "google/protobuf/compiler/java/full/enum_field.h"
#include "google/protobuf/compiler/java/full/extension.h"
#include "google/protobuf/compiler/java/full/field_generator.h"
#include "google/protobuf/compiler/java/full/generator_factory.h"
#include "google/protobuf/compiler/java/full/make_field_gens.h"
#include "google/protobuf/compiler/java/full/map_field.h"
#include "google/protobuf/compiler/java/full/message.h"
#include "google/protobuf/compiler/java/full/message_builder.h"
#include "google/protobuf/compiler/java/full/message_field.h"
#include "google/protobuf/compiler/java/full/primitive_field.h"
#include "google/protobuf/compiler/java/full/service.h"
#include "google/protobuf/compiler/java/full/string_field.h"
#include "google/protobuf/compiler/java/generator.h"
#include "google/protobuf/compiler/java/generator_common.h"
#include "google/protobuf/compiler/java/generator_factory.h"
#include "google/protobuf/compiler/java/helpers.h"
#include "google/protobuf/compiler/java/internal_helpers.h"
#include "google/protobuf/compiler/java/java_features.pb.h"
#include "google/protobuf/compiler/java/kotlin_generator.h"
#include "google/protobuf/compiler/java/lite/enum.h"
#include "google/protobuf/compiler/java/lite/enum_field.h"
#include "google/protobuf/compiler/java/lite/extension.h"
#include "google/protobuf/compiler/java/lite/field_generator.h"
#include "google/protobuf/compiler/java/lite/generator_factory.h"
#include "google/protobuf/compiler/java/lite/make_field_gens.h"
#include "google/protobuf/compiler/java/lite/map_field.h"
#include "google/protobuf/compiler/java/lite/message.h"
#include "google/protobuf/compiler/java/lite/message_builder.h"
#include "google/protobuf/compiler/java/lite/message_field.h"
#include "google/protobuf/compiler/java/lite/primitive_field.h"
#include "google/protobuf/compiler/java/lite/string_field.h"
#include "google/protobuf/compiler/java/message_serialization.h"
#include "google/protobuf/compiler/java/name_resolver.h"
#include "google/protobuf/compiler/java/names.h"
#include "google/protobuf/compiler/java/options.h"
#include "google/protobuf/compiler/java/shared_code_generator.h"
#include "google/protobuf/compiler/objectivec/enum.h"
#include "google/protobuf/compiler/objectivec/enum_field.h"
#include "google/protobuf/compiler/objectivec/extension.h"
#include "google/protobuf/compiler/objectivec/field.h"
#include "google/protobuf/compiler/objectivec/file.h"
#include "google/protobuf/compiler/objectivec/generator.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/compiler/objectivec/import_writer.h"
#include "google/protobuf/compiler/objectivec/line_consumer.h"
#include "google/protobuf/compiler/objectivec/map_field.h"
#include "google/protobuf/compiler/objectivec/message.h"
#include "google/protobuf/compiler/objectivec/message_field.h"
#include "google/protobuf/compiler/objectivec/names.h"
#include "google/protobuf/compiler/objectivec/nsobject_methods.h"
#include "google/protobuf/compiler/objectivec/oneof.h"
#include "google/protobuf/compiler/objectivec/options.h"
#include "google/protobuf/compiler/objectivec/primitive_field.h"
#include "google/protobuf/compiler/objectivec/tf_decode_data.h"
#include "google/protobuf/compiler/parser.h"
#include "google/protobuf/compiler/php/names.h"
#include "google/protobuf/compiler/php/php_generator.h"
#include "google/protobuf/compiler/plugin.h"
#include "google/protobuf/compiler/plugin.pb.h"
#include "google/protobuf/compiler/plugin.proto"
#include "google/protobuf/compiler/python/generator.h"
#include "google/protobuf/compiler/python/helpers.h"
#include "google/protobuf/compiler/python/pyi_generator.h"
#include "google/protobuf/compiler/retention.h"
#include "google/protobuf/compiler/ruby/ruby_generator.h"
#include "google/protobuf/compiler/rust/accessors/accessor_case.h"
#include "google/protobuf/compiler/rust/accessors/accessors.h"
#include "google/protobuf/compiler/rust/accessors/generator.h"
#include "google/protobuf/compiler/rust/accessors/helpers.h"
#include "google/protobuf/compiler/rust/context.h"
#include "google/protobuf/compiler/rust/crate_mapping.h"
#include "google/protobuf/compiler/rust/enum.h"
#include "google/protobuf/compiler/rust/generator.h"
#include "google/protobuf/compiler/rust/message.h"
#include "google/protobuf/compiler/rust/naming.h"
#include "google/protobuf/compiler/rust/oneof.h"
#include "google/protobuf/compiler/rust/relative_path.h"
#include "google/protobuf/compiler/rust/rust_field_type.h"
#include "google/protobuf/compiler/rust/rust_keywords.h"
#include "google/protobuf/compiler/scc.h"
#include "google/protobuf/compiler/subprocess.h"
#include "google/protobuf/compiler/versions.h"
#include "google/protobuf/compiler/zip_writer.h"
#include "google/protobuf/cpp_edition_defaults.h"
#include "google/protobuf/cpp_features.pb.h"
#include "google/protobuf/cpp_features.proto"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/descriptor.proto"
#include "google/protobuf/descriptor_database.h"
#include "google/protobuf/descriptor_legacy.h"
#include "google/protobuf/descriptor_lite.h"
#include "google/protobuf/descriptor_visitor.h"
#include "google/protobuf/duration.pb.h"
#include "google/protobuf/duration.proto"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/empty.pb.h"
#include "google/protobuf/empty.proto"
#include "google/protobuf/endian.h"
#include "google/protobuf/explicitly_constructed.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/extension_set_inl.h"
#include "google/protobuf/feature_resolver.h"
#include "google/protobuf/field_access_listener.h"
#include "google/protobuf/field_mask.pb.h"
#include "google/protobuf/field_mask.proto"
#include "google/protobuf/generated_enum_reflection.h"
#include "google/protobuf/generated_enum_util.h"
#include "google/protobuf/generated_message_bases.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/generated_message_tctable_decl.h"
#include "google/protobuf/generated_message_tctable_gen.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/has_bits.h"
#include "google/protobuf/implicit_weak_message.h"
#include "google/protobuf/inlined_string_field.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/io/gzip_stream.h"
#include "google/protobuf/io/io_win32.h"
#include "google/protobuf/io/printer.h"
#include "google/protobuf/io/strtod.h"
#include "google/protobuf/io/tokenizer.h"
#include "google/protobuf/io/zero_copy_sink.h"
#include "google/protobuf/io/zero_copy_stream.h"
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
#include "google/protobuf/json/internal/descriptor_traits.h"
#include "google/protobuf/json/internal/lexer.h"
#include "google/protobuf/json/internal/message_path.h"
#include "google/protobuf/json/internal/parser.h"
#include "google/protobuf/json/internal/parser_traits.h"
#include "google/protobuf/json/internal/unparser.h"
#include "google/protobuf/json/internal/unparser_traits.h"
#include "google/protobuf/json/internal/untyped_message.h"
#include "google/protobuf/json/internal/writer.h"
#include "google/protobuf/json/internal/zero_copy_buffered_stream.h"
#include "google/protobuf/json/json.h"
#include "google/protobuf/map.h"
#include "google/protobuf/map_entry.h"
#include "google/protobuf/map_field.h"
#include "google/protobuf/map_field_inl.h"
#include "google/protobuf/map_field_lite.h"
#include "google/protobuf/map_type_handler.h"
#include "google/protobuf/message.h"
#include "google/protobuf/message_lite.h"
#include "google/protobuf/metadata.h"
#include "google/protobuf/metadata_lite.h"
#include "google/protobuf/parse_context.h"
#include "google/protobuf/port.h"
#include "google/protobuf/port_def.inc"
#include "google/protobuf/port_undef.inc"
#include "google/protobuf/raw_ptr.h"
#include "google/protobuf/reflection.h"
#include "google/protobuf/reflection_internal.h"
#include "google/protobuf/reflection_mode.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/reflection_visit_field_info.h"
#include "google/protobuf/reflection_visit_fields.h"
#include "google/protobuf/repeated_field.h"
#include "google/protobuf/repeated_ptr_field.h"
#include "google/protobuf/runtime_version.h"
#include "google/protobuf/serial_arena.h"
#include "google/protobuf/service.h"
#include "google/protobuf/source_context.pb.h"
#include "google/protobuf/source_context.proto"
#include "google/protobuf/string_block.h"
#include "google/protobuf/struct.pb.h"
#include "google/protobuf/struct.proto"
#include "google/protobuf/stubs/callback.h"
#include "google/protobuf/stubs/common.h"
#include "google/protobuf/stubs/platform_macros.h"
#include "google/protobuf/stubs/port.h"
#include "google/protobuf/stubs/status_macros.h"
#include "google/protobuf/testing/file.h"
#include "google/protobuf/text_format.h"
#include "google/protobuf/thread_safe_arena.h"
#include "google/protobuf/timestamp.pb.h"
#include "google/protobuf/timestamp.proto"
#include "google/protobuf/type.pb.h"
#include "google/protobuf/type.proto"
#include "google/protobuf/unknown_field_set.h"
#include "google/protobuf/util/delimited_message_util.h"
#include "google/protobuf/util/field_comparator.h"
#include "google/protobuf/util/field_mask_util.h"
#include "google/protobuf/util/json_util.h"
#include "google/protobuf/util/message_differencer.h"
#include "google/protobuf/util/time_util.h"
#include "google/protobuf/util/type_resolver.h"
#include "google/protobuf/util/type_resolver_util.h"
#include "google/protobuf/varint_shuffle.h"
#include "google/protobuf/wire_format.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/wrappers.pb.h"
#include "google/protobuf/wrappers.proto"
#include "java/core/src/main/resources/google/protobuf/java_features.proto"
#include "upb_generator/mangle.h"
#include "utf8_range.h"
#include "utf8_validity.h"