From 4606ded90ca9542d5452b348e5415df67aa3622a Mon Sep 17 00:00:00 2001 From: Marina Ciocea Date: Mon, 10 Jun 2019 19:53:27 +0000 Subject: [PATCH] Revert "Link fewer X11-related libraries" This reverts commit 829a5dce900b781376ea72ba5d869c5dbe58a82d. Reason for revert: Suspect of breaking autoroll to chromium: https://crrev.com/c/1651414. Original change's description: > Link fewer X11-related libraries > > Use an explicit list and don't add X11 dependency to rtc_base. > > Allow skipping code that depends on rarer extensions such as Xdamage, Xfixes. > > Bug: None > Change-Id: Icb8d20a267358f5cd3f1ff2af31a669e0670d2f6 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140865 > Reviewed-by: Mirko Bonadei > Reviewed-by: Guido Urdaneta > Reviewed-by: Henrik Andreassson > Commit-Queue: Oleh Prypin > Cr-Commit-Position: refs/heads/master@{#28204} TBR=zijiehe@chromium.org,mbonadei@webrtc.org,henrika@webrtc.org,oprypin@webrtc.org,guidou@webrtc.org Change-Id: Ie106de700fc017dafa603d15eaec88c4790dacfb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141300 Reviewed-by: Marina Ciocea Commit-Queue: Marina Ciocea Cr-Commit-Position: refs/heads/master@{#28215} --- modules/desktop_capture/BUILD.gn | 15 ++++----------- rtc_base/BUILD.gn | 11 +++++++++++ webrtc.gni | 9 ++------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 59f4ab0083..e6797bf771 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -366,7 +366,7 @@ rtc_static_library("desktop_capture_generic") { ] } - if (rtc_use_x11_extensions || rtc_use_pipewire) { + if (rtc_use_x11 || rtc_use_pipewire) { sources += [ "mouse_cursor_monitor_linux.cc", "screen_capturer_linux.cc", @@ -378,7 +378,7 @@ rtc_static_library("desktop_capture_generic") { } } - if (rtc_use_x11_extensions) { + if (rtc_use_x11) { sources += [ "linux/mouse_cursor_monitor_x11.cc", "linux/mouse_cursor_monitor_x11.h", @@ -401,14 +401,7 @@ rtc_static_library("desktop_capture_generic") { "linux/x_window_property.cc", "linux/x_window_property.h", ] - libs = [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrender", - ] + configs += [ "//build/config/linux:x11" ] if (build_with_mozilla) { sources += [ @@ -421,7 +414,7 @@ rtc_static_library("desktop_capture_generic") { } } - if (!is_win && !is_mac && !rtc_use_x11_extensions && !rtc_use_pipewire) { + if (!is_win && !is_mac && !rtc_use_x11 && !rtc_use_pipewire) { sources += [ "mouse_cursor_monitor_null.cc", "screen_capturer_null.cc", diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 86dee935cf..a3dd22eee1 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -950,6 +950,17 @@ rtc_static_library("rtc_base") { deps += [ "system:cocoa_threading" ] } + if (rtc_use_x11) { + libs += [ + "dl", + "rt", + "Xext", + "X11", + "Xcomposite", + "Xrender", + ] + } + if (is_linux) { libs += [ "dl", diff --git a/webrtc.gni b/webrtc.gni index 3a8592ddcf..6ba8d0aeb3 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -242,10 +242,6 @@ declare_args() { # Include tests in standalone checkout. rtc_include_tests = !build_with_chromium && !build_with_mozilla - - # Set this to false to skip building code that also requires X11 extensions - # such as Xdamage, Xfixes. - rtc_use_x11_extensions = rtc_use_x11 } # Make it possible to provide custom locations for some libraries (move these @@ -254,9 +250,8 @@ rtc_libvpx_dir = "//third_party/libvpx" rtc_opus_dir = "//third_party/opus" # Desktop capturer is supported only on Windows, OSX and Linux. -rtc_desktop_capture_supported = - (is_win && current_os != "winuwp") || is_mac || - (is_linux && (rtc_use_x11_extensions || rtc_use_pipewire)) +rtc_desktop_capture_supported = (is_win && current_os != "winuwp") || is_mac || + (is_linux && (rtc_use_x11 || rtc_use_pipewire)) ############################################################################### # Templates