[build] use import_protobuf_full param
This hides the directory layout of the protobuf sources, which is a
nicer abstraction for users of the protobuf templates.
Bug: 59636
Change-Id: I3a57b242f2b6bcec33fb3590b79c0aa9ef9bcd48
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt/+/487899
Reviewed-by: Zach Bush <zmbush@google.com>
Commit-Queue: Gary Miguel <garymm@google.com>
diff --git a/src/lib/clearcut/BUILD.gn b/src/lib/clearcut/BUILD.gn
index 9dcd180..9d69182 100644
--- a/src/lib/clearcut/BUILD.gn
+++ b/src/lib/clearcut/BUILD.gn
@@ -8,7 +8,7 @@
proto_library("clearcut_proto") {
sources = [ "clearcut.proto" ]
- import_dirs = [ "//third_party/protobuf/src" ]
+ import_protobuf_full = true
generate_python = false
cc_generator_options = "lite"
}
diff --git a/src/local_aggregation/BUILD.gn b/src/local_aggregation/BUILD.gn
index 1aa3fc4..8d7af10 100644
--- a/src/local_aggregation/BUILD.gn
+++ b/src/local_aggregation/BUILD.gn
@@ -9,7 +9,7 @@
proto_library("cobalt_local_aggregation_proto") {
proto_in_dir = "$cobalt_root"
sources = [ "local_aggregation.proto" ]
- import_dirs = [ "//third_party/protobuf/src" ]
+ import_protobuf_full = true
generate_python = false
cc_generator_options = "lite"
deps = [ "$cobalt_root/src/registry:cobalt_registry_proto" ]
diff --git a/src/local_aggregation_1_1/BUILD.gn b/src/local_aggregation_1_1/BUILD.gn
index 40322cd..c45626e 100644
--- a/src/local_aggregation_1_1/BUILD.gn
+++ b/src/local_aggregation_1_1/BUILD.gn
@@ -9,7 +9,7 @@
proto_library("proto") {
proto_in_dir = "$cobalt_root"
sources = [ "local_aggregation.proto" ]
- import_dirs = [ "//third_party/protobuf/src" ]
+ import_protobuf_full = true
generate_python = false
cc_generator_options = "lite"
diff --git a/src/observation_store/BUILD.gn b/src/observation_store/BUILD.gn
index cc79241..d829f63 100644
--- a/src/observation_store/BUILD.gn
+++ b/src/observation_store/BUILD.gn
@@ -14,10 +14,10 @@
sources = [ "observation_store_internal.proto" ]
extra_configs = [ "$cobalt_root:cobalt_config" ]
import_dirs = [
- "//third_party/protobuf/src",
"$cobalt_root",
"$cobalt_root/src/pb",
]
+ import_protobuf_full = true
cc_generator_options = "lite"
generate_python = false
deps = [
diff --git a/src/pb/BUILD.gn b/src/pb/BUILD.gn
index b0cbaa2..75a8f5d 100644
--- a/src/pb/BUILD.gn
+++ b/src/pb/BUILD.gn
@@ -17,11 +17,9 @@
"observation.proto",
"observation_batch.proto",
]
- import_dirs = [
- "//third_party/protobuf/src",
- "$cobalt_root",
- ]
+ import_dirs = [ "$cobalt_root" ]
proto_in_dir = "$cobalt_root"
+ import_protobuf_full = true
generate_python = false
cc_generator_options = "lite"
deps = [
diff --git a/src/registry/BUILD.gn b/src/registry/BUILD.gn
index aa6d4d2..fb84733 100644
--- a/src/registry/BUILD.gn
+++ b/src/registry/BUILD.gn
@@ -30,7 +30,7 @@
sources += [ "${name}.proto" ]
}
- import_dirs = [ "//third_party/protobuf/src" ]
+ import_protobuf_full = true
generate_python = false
generate_go = true
cc_generator_options = "lite"