From 08f6a6c672d3be5f2614729dc0eaaf2bcdb2c272 Mon Sep 17 00:00:00 2001 From: Kimmo Kinnunen Date: Tue, 26 Feb 2019 11:46:17 +0200 Subject: [PATCH] Import proto_library.gni when rtc_enable_protobuf is true Import proto_library.gni when rtc_enable_protobuf is true instead of when build_with_mozilla is false. Makes it maybe easier to reason about the intention (e.g. intention is to not compile any protobuf in, hence flag rtc_enable_protobuf) The build file could not work if build_with_mozilla = true but rtc_enable_protobuf = true. Bug: webrtc:10338 Change-Id: I26e5983bd1519aa46c308b11796d518de5ef7597 Reviewed-on: https://webrtc-review.googlesource.com/c/123763 Commit-Queue: Mirko Bonadei Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#26868} --- AUTHORS | 1 + BUILD.gn | 2 +- logging/BUILD.gn | 2 +- modules/audio_coding/BUILD.gn | 2 +- modules/audio_processing/BUILD.gn | 2 +- rtc_tools/BUILD.gn | 5 +++-- rtc_tools/network_tester/BUILD.gn | 4 +++- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7e2e732f8d..bdd24f3eaf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -91,6 +91,7 @@ Intel Corporation <*@intel.com> Microsoft Corporation <*@microsoft.com> MIPS Technologies <*@mips.com> Mozilla Foundation <*@mozilla.com> +NVIDIA Corporation <*@nvidia.com> Opera Software ASA <*@opera.com> Optical Tone Ltd <*@opticaltone.com> Sinch AB <*@sinch.com> diff --git a/BUILD.gn b/BUILD.gn index 58277ffb03..590345e102 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,7 +15,7 @@ import("//build/config/linux/pkg_config.gni") import("//build/config/sanitizers/sanitizers.gni") import("webrtc.gni") -if (!build_with_mozilla) { +if (rtc_enable_protobuf) { import("//third_party/protobuf/proto_library.gni") } if (is_android) { diff --git a/logging/BUILD.gn b/logging/BUILD.gn index e904e60168..da4920f292 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -7,7 +7,7 @@ # be found in the AUTHORS file in the root of the source tree. import("../webrtc.gni") -if (!build_with_mozilla) { +if (rtc_enable_protobuf) { import("//third_party/protobuf/proto_library.gni") } if (is_android) { diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index 693fa650db..34cee985a5 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -8,7 +8,7 @@ import("../../webrtc.gni") import("audio_coding.gni") -if (!build_with_mozilla) { +if (rtc_enable_protobuf) { import("//third_party/protobuf/proto_library.gni") } diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index 9bef731f85..6fc7d86cf3 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -7,7 +7,7 @@ # be found in the AUTHORS file in the root of the source tree. import("../../webrtc.gni") -if (!build_with_mozilla) { +if (rtc_enable_protobuf) { import("//third_party/protobuf/proto_library.gni") } diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 3755967797..f9096507d7 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -5,9 +5,10 @@ # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. - -import("//third_party/protobuf/proto_library.gni") import("../webrtc.gni") +if (rtc_enable_protobuf) { + import("//third_party/protobuf/proto_library.gni") +} group("rtc_tools") { # This target shall build all targets in tools/. diff --git a/rtc_tools/network_tester/BUILD.gn b/rtc_tools/network_tester/BUILD.gn index 5445138109..70c15bbb25 100644 --- a/rtc_tools/network_tester/BUILD.gn +++ b/rtc_tools/network_tester/BUILD.gn @@ -6,8 +6,10 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. -import("//third_party/protobuf/proto_library.gni") import("../../webrtc.gni") +if (rtc_enable_protobuf) { + import("//third_party/protobuf/proto_library.gni") +} if (rtc_enable_protobuf) { proto_library("network_tester_config_proto") {