Enable building without the proto library.
When using Dawn as library with CMake the user may not have the required
proto libraries checked out. This CL adds more guards to the proto code
in order to disable the build if desired.
Change-Id: I2b3a8a9cb67500db80d025aff4011e7593381863
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/192381
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/scripts/tint_overrides_with_defaults.gni b/scripts/tint_overrides_with_defaults.gni
index 82d6f8c..8ab6c42 100644
--- a/scripts/tint_overrides_with_defaults.gni
+++ b/scripts/tint_overrides_with_defaults.gni
@@ -42,7 +42,13 @@
}
tint_has_fuzzers = tint_has_build
-tint_has_protobuf = tint_standalone || build_with_chromium
+
+declare_args() {
+ # Is protobuf support present
+ if (!defined(tint_has_protobuf)) {
+ tint_has_protobuf = tint_standalone || build_with_chromium
+ }
+}
declare_args() {
# Path to tint checkout