From cd66a7460905b2905769acc3c80a0dd3d7b4a856 Mon Sep 17 00:00:00 2001 From: Zihan Chen Date: Wed, 8 Sep 2021 15:30:43 -0700 Subject: [PATCH] pw_third_party: update protobuf to build google.protobuf No-Docs-Update-Reason: minor third-party addition Change-Id: I4abee5f05b6f893f817c24adab0969804ecbb578 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/60186 Commit-Queue: Zihan Chen Pigweed-Auto-Submit: Zihan Chen Reviewed-by: David Rogers Reviewed-by: Wyatt Hepler --- third_party/protobuf/BUILD.gn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn index 8e42cf827..d33c58869 100644 --- a/third_party/protobuf/BUILD.gn +++ b/third_party/protobuf/BUILD.gn @@ -15,6 +15,7 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") +import("$dir_pw_protobuf_compiler/proto.gni") import("protobuf.gni") # This file defines a GN source_set for an external installation of protobuf. @@ -146,6 +147,23 @@ if (dir_pw_third_party_protobuf != "") { public_deps = [ ":libprotobuf_lite" ] configs = [ ":defines" ] } + + pw_proto_library("wellknown_types") { + sources = [ + "$dir_pw_third_party_protobuf/src/google/protobuf/any.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/api.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/descriptor.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/duration.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/empty.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/field_mask.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/source_context.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/struct.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/timestamp.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/type.proto", + "$dir_pw_third_party_protobuf/src/google/protobuf/wrappers.proto", + ] + strip_prefix = "$dir_pw_third_party_protobuf/src/" + } } else { # As mentioned above, these targets are effectively disabled if the build # argument pointing to the protobuf source directory is not set.