Files
ce_cdm/third_party/protobuf.gyp
John "Juce" Bruce 694cf6fb25 Source release 17.1.0
2022-07-07 17:14:31 -07:00

301 lines
14 KiB
Python

# Copyright 2015 Google Inc. All Rights Reserved.
#
# Describes building protobuf_lite, protobuf, and protoc from sources.
# This is only used by the build files if protobuf_source is configured to
# point here and protobuf_config is set to 'source'.
#
# Based on the BUILD file in the Protobuf C++ release package.
# Source lists accurate as of Protobuf v3.8.0
{
# Some sources are used by both protobuf_lite and protobuf. Representing this
# with dependencies means that protobuf_lite must be built with both the
# target and host toolsets. Although GYP allows for this, this causes bugs in
# the generated output for both xcode and ninja. Therefore we include this
# variable in the sources of both libraries instead.
'variables': {
'protobuf_common_sources': [
'protobuf/src/google/protobuf/any_lite.cc',
'protobuf/src/google/protobuf/arena.cc',
'protobuf/src/google/protobuf/arenastring.cc',
'protobuf/src/google/protobuf/extension_set.cc',
'protobuf/src/google/protobuf/generated_enum_util.cc',
'protobuf/src/google/protobuf/generated_message_table_driven_lite.cc',
'protobuf/src/google/protobuf/generated_message_tctable_lite.cc',
'protobuf/src/google/protobuf/generated_message_util.cc',
'protobuf/src/google/protobuf/implicit_weak_message.cc',
'protobuf/src/google/protobuf/inlined_string_field.cc',
'protobuf/src/google/protobuf/io/coded_stream.cc',
'protobuf/src/google/protobuf/io/io_win32.cc',
'protobuf/src/google/protobuf/io/strtod.cc',
'protobuf/src/google/protobuf/io/zero_copy_stream.cc',
'protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc',
'protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
'protobuf/src/google/protobuf/map.cc',
'protobuf/src/google/protobuf/message_lite.cc',
'protobuf/src/google/protobuf/parse_context.cc',
'protobuf/src/google/protobuf/repeated_field.cc',
'protobuf/src/google/protobuf/repeated_ptr_field.cc',
'protobuf/src/google/protobuf/stubs/bytestream.cc',
'protobuf/src/google/protobuf/stubs/common.cc',
'protobuf/src/google/protobuf/stubs/int128.cc',
'protobuf/src/google/protobuf/stubs/status.cc',
'protobuf/src/google/protobuf/stubs/statusor.cc',
'protobuf/src/google/protobuf/stubs/stringpiece.cc',
'protobuf/src/google/protobuf/stubs/stringprintf.cc',
'protobuf/src/google/protobuf/stubs/structurally_valid.cc',
'protobuf/src/google/protobuf/stubs/strutil.cc',
'protobuf/src/google/protobuf/stubs/time.cc',
'protobuf/src/google/protobuf/wire_format_lite.cc',
],
},
'target_defaults': {
'defines': [
'GOOGLE_PROTOBUF_NO_RTTI',
# These defines come from Protobuf's BUILD file.
'HAVE_PTHREAD',
],
},
'targets': [
{
'target_name': 'protobuf_lite',
'toolsets': ['target' ],
'type': 'static_library',
'standalone_static_library': 1,
'hard_dependency': 1,
'toolsets': ['target'],
'sources': [
'<@(protobuf_common_sources)',
],
'include_dirs': [
'protobuf',
'protobuf/src',
],
'includes': ['disable_warnings.gypi'],
'xcode_settings': {
'OTHER_CFLAGS': ['-w'],
'USE_HEADERMAP': 'NO',
},
'msvs_settings': {
'VCCLCompilerTool': {
# Disable warnings for third-party code.
'WarningLevel': '0',
},
},
'direct_dependent_settings': {
'include_dirs': [
'protobuf/src',
],
# Protobuf's exported headers require that these values match when
# compiling Protobuf and when depending on Protobuf.
'defines': [
'GOOGLE_PROTOBUF_NO_RTTI',
],
},
},
{
'target_name': 'protobuf',
'type': 'static_library',
'toolsets': ['host'],
'sources': [
'<@(protobuf_common_sources)',
'protobuf/src/google/protobuf/any.cc',
'protobuf/src/google/protobuf/any.pb.cc',
'protobuf/src/google/protobuf/api.pb.cc',
'protobuf/src/google/protobuf/compiler/importer.cc',
'protobuf/src/google/protobuf/compiler/parser.cc',
'protobuf/src/google/protobuf/descriptor.cc',
'protobuf/src/google/protobuf/descriptor.pb.cc',
'protobuf/src/google/protobuf/descriptor_database.cc',
'protobuf/src/google/protobuf/duration.pb.cc',
'protobuf/src/google/protobuf/dynamic_message.cc',
'protobuf/src/google/protobuf/empty.pb.cc',
'protobuf/src/google/protobuf/extension_set_heavy.cc',
'protobuf/src/google/protobuf/field_mask.pb.cc',
'protobuf/src/google/protobuf/generated_message_bases.cc',
'protobuf/src/google/protobuf/generated_message_reflection.cc',
'protobuf/src/google/protobuf/generated_message_table_driven.cc',
'protobuf/src/google/protobuf/generated_message_tctable_full.cc',
'protobuf/src/google/protobuf/io/gzip_stream.cc',
'protobuf/src/google/protobuf/io/printer.cc',
'protobuf/src/google/protobuf/io/tokenizer.cc',
'protobuf/src/google/protobuf/map_field.cc',
'protobuf/src/google/protobuf/message.cc',
'protobuf/src/google/protobuf/reflection_ops.cc',
'protobuf/src/google/protobuf/service.cc',
'protobuf/src/google/protobuf/source_context.pb.cc',
'protobuf/src/google/protobuf/struct.pb.cc',
'protobuf/src/google/protobuf/stubs/substitute.cc',
'protobuf/src/google/protobuf/text_format.cc',
'protobuf/src/google/protobuf/timestamp.pb.cc',
'protobuf/src/google/protobuf/type.pb.cc',
'protobuf/src/google/protobuf/unknown_field_set.cc',
'protobuf/src/google/protobuf/util/delimited_message_util.cc',
'protobuf/src/google/protobuf/util/field_comparator.cc',
'protobuf/src/google/protobuf/util/field_mask_util.cc',
'protobuf/src/google/protobuf/util/internal/datapiece.cc',
'protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc',
'protobuf/src/google/protobuf/util/internal/error_listener.cc',
'protobuf/src/google/protobuf/util/internal/field_mask_utility.cc',
'protobuf/src/google/protobuf/util/internal/json_escaping.cc',
'protobuf/src/google/protobuf/util/internal/json_objectwriter.cc',
'protobuf/src/google/protobuf/util/internal/json_stream_parser.cc',
'protobuf/src/google/protobuf/util/internal/object_writer.cc',
'protobuf/src/google/protobuf/util/internal/proto_writer.cc',
'protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc',
'protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc',
'protobuf/src/google/protobuf/util/internal/type_info.cc',
'protobuf/src/google/protobuf/util/internal/utility.cc',
'protobuf/src/google/protobuf/util/json_util.cc',
'protobuf/src/google/protobuf/util/message_differencer.cc',
'protobuf/src/google/protobuf/util/time_util.cc',
'protobuf/src/google/protobuf/util/type_resolver_util.cc',
'protobuf/src/google/protobuf/wire_format.cc',
'protobuf/src/google/protobuf/wrappers.pb.cc',
],
'include_dirs': [
'protobuf',
'protobuf/src',
],
'includes': [
'disable_warnings.gypi',
'xcode_host.gypi', # XCode workaround
],
'xcode_settings': {
'OTHER_CFLAGS': ['-w'],
'USE_HEADERMAP': 'NO',
},
'msvs_settings': {
'VCCLCompilerTool': {
# Disable warnings for third-party code.
'WarningLevel': '0',
},
},
},
{
'target_name': 'protoc',
'type': 'executable',
'toolsets': ['host'],
'sources': [
'protobuf/src/google/protobuf/compiler/code_generator.cc',
'protobuf/src/google/protobuf/compiler/command_line_interface.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc',
'protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc',
'protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_context.cc',
'protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc',
'protobuf/src/google/protobuf/compiler/java/java_enum.cc',
'protobuf/src/google/protobuf/compiler/java/java_enum_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_extension.cc',
'protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_file.cc',
'protobuf/src/google/protobuf/compiler/java/java_generator.cc',
'protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc',
'protobuf/src/google/protobuf/compiler/java/java_helpers.cc',
'protobuf/src/google/protobuf/compiler/java/java_kotlin_generator.cc',
'protobuf/src/google/protobuf/compiler/java/java_map_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_message.cc',
'protobuf/src/google/protobuf/compiler/java/java_message_builder.cc',
'protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_message_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_message_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc',
'protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc',
'protobuf/src/google/protobuf/compiler/java/java_service.cc',
'protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc',
'protobuf/src/google/protobuf/compiler/java/java_string_field.cc',
'protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc',
'protobuf/src/google/protobuf/compiler/js/js_generator.cc',
'protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc',
'protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc',
'protobuf/src/google/protobuf/compiler/php/php_generator.cc',
'protobuf/src/google/protobuf/compiler/plugin.cc',
'protobuf/src/google/protobuf/compiler/plugin.pb.cc',
'protobuf/src/google/protobuf/compiler/python/python_generator.cc',
'protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc',
'protobuf/src/google/protobuf/compiler/subprocess.cc',
'protobuf/src/google/protobuf/compiler/zip_writer.cc',
'protobuf/src/google/protobuf/compiler/main.cc',
],
'include_dirs': [
'protobuf',
'protobuf/src',
],
'dependencies': [
':protobuf',
],
'includes': [
'disable_warnings.gypi',
'xcode_host.gypi', # XCode workaround
],
'xcode_settings': {
'OTHER_CFLAGS': ['-w'],
'USE_HEADERMAP': 'NO',
},
'msvs_settings': {
'VCCLCompilerTool': {
# Disable warnings for third-party code.
'WarningLevel': '0',
},
},
'conditions': [
['OS!="win"', {
'libraries': [
'-lpthread',
'-lm',
],
}],
],
},
],
}