From 84ba8b6f4567e418b4ede67c3b7583e9952411b5 Mon Sep 17 00:00:00 2001 From: kjellander Date: Sun, 24 Apr 2016 23:03:07 -0700 Subject: [PATCH] GN: Fix dependency for rtc_base_approved In https://codereview.webrtc.org/1921463002/ a dependency on Foundation.framework was added to rtc_base_approved for the GYP build but not for the GN build. This was fixed for some targets in https://codereview.webrtc.org/1919673002/ but the proper fix is to introduce an all_dependent_configs entry for rtc_base_approved. NOTRY=True Review URL: https://codereview.webrtc.org/1921513002 Cr-Commit-Position: refs/heads/master@{#12483} --- webrtc/base/BUILD.gn | 7 +++++++ webrtc/tools/BUILD.gn | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 115f31a042..73382f19fa 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -12,6 +12,12 @@ import("../build/webrtc.gni") import("//build_overrides/webrtc.gni") +config("rtc_base_approved_all_dependent_config") { + if (is_mac && !build_with_chromium) { + libs = [ "Foundation.framework" ] # needed for logging_mac.mm + } +} + config("rtc_base_config") { include_dirs = [ "//third_party/jsoncpp/overrides/include", @@ -94,6 +100,7 @@ static_library("rtc_base_approved") { deps = [] configs += [ "..:common_config" ] public_configs = [ "..:common_inherited_config" ] + all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] sources = [ "array_view.h", diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn index c71d31d34b..603e99944c 100644 --- a/webrtc/tools/BUILD.gn +++ b/webrtc/tools/BUILD.gn @@ -47,9 +47,6 @@ executable("frame_analyzer") { ":command_line_parser", ":video_quality_analysis", ] - if (is_mac) { - libs = [ "Foundation.framework" ] - } } executable("rgba_to_i420_converter") { @@ -62,9 +59,6 @@ executable("rgba_to_i420_converter") { ":command_line_parser", "../common_video", ] - if (is_mac) { - libs = [ "Foundation.framework" ] - } } # TODO(kjellander): Convert all of tools.gyp into GN here. @@ -85,8 +79,5 @@ if (!build_with_chromium) { "../test:test_support_main", "//testing/gtest", ] - if (is_mac) { - libs = [ "Foundation.framework" ] - } } }