From 4e8a797e141218c7869ff5bdcb438c61e90784db Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Wed, 7 Oct 2020 16:20:25 +0200 Subject: [PATCH] Guard pipewire configs with rtc_use_pipewire. [1] has introduced two dependencies on //modules/desktop_capture:pipewire_config even when rtc_use_pipewire=false, this CL changes the guard in order to make sure GN doesn't raise errors when is_linux=true and rtc_use_pipewire=false. [1] - https://webrtc-review.googlesource.com/c/src/+/160649 No-Try: True Bug: chromium:682122 Change-Id: I28d2f10936dd75199a2a98862751708eb1e5615a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187122 Commit-Queue: Mirko Bonadei Reviewed-by: Tommi Cr-Commit-Position: refs/heads/master@{#32345} --- modules/desktop_capture/BUILD.gn | 40 ++++++++++++++------------------ 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 9bb9f62280..fd26d70cd7 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -76,19 +76,17 @@ if (rtc_include_tests) { "window_finder_unittest.cc", ] public_configs = [ ":x11_config" ] - if (is_linux) { + if (rtc_use_pipewire) { public_configs += [ ":pipewire_config" ] - if (rtc_use_pipewire) { - configs += [ - ":pipewire_config", - ":gio", - ] + configs += [ + ":pipewire_config", + ":gio", + ] - if (rtc_link_pipewire) { - configs += [ ":pipewire" ] - } else { - deps += [ ":pipewire_stubs" ] - } + if (rtc_link_pipewire) { + configs += [ ":pipewire" ] + } else { + deps += [ ":pipewire_stubs" ] } } if (is_win) { @@ -147,19 +145,17 @@ if (rtc_include_tests) { } deps += [ ":desktop_capture_mock" ] public_configs = [ ":x11_config" ] - if (is_linux) { + if (rtc_use_pipewire) { public_configs += [ ":pipewire_config" ] - if (rtc_use_pipewire) { - configs += [ - ":pipewire_config", - ":gio", - ] + configs += [ + ":pipewire_config", + ":gio", + ] - if (rtc_link_pipewire) { - configs += [ ":pipewire" ] - } else { - deps += [ ":pipewire_stubs" ] - } + if (rtc_link_pipewire) { + configs += [ ":pipewire" ] + } else { + deps += [ ":pipewire_stubs" ] } } }