# This file was generated by the YaTool build system (https://github.com/yandex/yatool),
# from a source YaTool build configuration provided in ya.make files.
#
# If the repository supports both CMake and ya build configurations, please modify both of them.
#
# If only CMake build configuration is supported then modify only CMake files and note that only
# simple modifications are allowed like adding source-files to targets or adding simple properties
# like target_include_directories. These modifications will be ported to original ya.make files
# by maintainers. Any complex modifications which can't be easily ported back to the ya build
# system may be rejected.
#
# Please refer to the build instructions in the repository for more information about manual
# changes in this file.

add_library(contrib-libs-protobuf)


target_compile_options(contrib-libs-protobuf PRIVATE
  -DGOOGLE_PROTOBUF_CMAKE_BUILD
  -DHAVE_ZLIB
  $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)

target_include_directories(contrib-libs-protobuf PUBLIC
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src
)

target_include_directories(contrib-libs-protobuf PRIVATE
  ${PROJECT_SOURCE_DIR}/contrib/restricted/google/utf8_range
)

target_link_libraries(contrib-libs-protobuf PUBLIC
  contrib-libs-linux-headers
  contrib-libs-cxxsupp
  yutil
  contrib-libs-zlib
  contrib-restricted-abseil-cpp-tstring
  restricted-google-utf8_range
  cpp-sanitizer-include
)

target_sources(contrib-libs-protobuf PRIVATE
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/any.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/any.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/any_lite.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/api.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/arena.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/arena_align.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/arena_config.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/arenastring.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/arenaz_sampler.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor_database.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/duration.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/dynamic_message.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/empty.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/extension_set.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/extension_set_heavy.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/field_mask.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_enum_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_full.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_gen.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/implicit_weak_message.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/inlined_string_field.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/gzip_stream.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/io_win32.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/printer.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/strtod.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/tokenizer.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_sink.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/lexer.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/message_path.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/parser.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/unparser.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/untyped_message.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/writer.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/json.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json/old_json.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/json_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/map.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/map_field.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/message.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/message_lite.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/messagext.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/parse_context.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/reflection_ops.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/repeated_field.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/repeated_ptr_field.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/service.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/source_context.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/struct.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/common.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/status.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/stringpiece.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/structurally_valid.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/strutil.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/stubs/substitute.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/text_format.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/timestamp.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/type.pb.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/delimited_message_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/field_comparator.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/field_mask_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/message_differencer.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/time_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/util/type_resolver_util.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/wire_format.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/wire_format_lite.cc
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/wrappers.pb.cc
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/any.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/api.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/duration.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/empty.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/source_context.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/struct.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/type.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/wrappers.proto
)


copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/any.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/any.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/api.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/api.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/descriptor.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/duration.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/duration.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/empty.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/empty.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/field_mask.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/source_context.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/source_context.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/struct.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/struct.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/timestamp.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/type.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/type.proto
)

copy_file(
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/wrappers.proto
  ${PROJECT_BINARY_DIR}/contrib/libs/protobuf/src/google/protobuf/wrappers.proto
)

add_global_library_for(contrib-libs-protobuf.global
  contrib-libs-protobuf)


target_compile_options(contrib-libs-protobuf.global PRIVATE
  -DGOOGLE_PROTOBUF_CMAKE_BUILD
  -DHAVE_ZLIB
  $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)

target_include_directories(contrib-libs-protobuf.global PUBLIC
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src
)

target_include_directories(contrib-libs-protobuf.global PRIVATE
  ${PROJECT_SOURCE_DIR}/contrib/restricted/google/utf8_range
)

target_link_libraries(contrib-libs-protobuf.global PUBLIC
  contrib-libs-linux-headers
  contrib-libs-cxxsupp
  yutil
  contrib-libs-zlib
  contrib-restricted-abseil-cpp-tstring
  restricted-google-utf8_range
  cpp-sanitizer-include
)

target_sources(contrib-libs-protobuf.global PRIVATE
  ${PROJECT_SOURCE_DIR}/contrib/libs/protobuf/src/google/protobuf/generated_message_util.cc
)

