Reland "Link fewer X11-related libraries"

This is a reland of 829a5dce900b781376ea72ba5d869c5dbe58a82d
(unchanged)
Downstream is fixed in https://chromium-review.googlesource.com/1651786

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 <mbonadei@webrtc.org>
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28204}

Bug: None
Change-Id: I51c60f7713eb49889cebbca2242f33b81b0aef39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141301
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28218}
This commit is contained in:
Oleh Prypin
2019-06-07 13:27:07 +02:00
committed by Commit Bot
parent 033ff02474
commit 240b893fd2
3 changed files with 18 additions and 17 deletions

View File

@ -366,7 +366,7 @@ rtc_static_library("desktop_capture_generic") {
]
}
if (rtc_use_x11 || rtc_use_pipewire) {
if (rtc_use_x11_extensions || 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) {
if (rtc_use_x11_extensions) {
sources += [
"linux/mouse_cursor_monitor_x11.cc",
"linux/mouse_cursor_monitor_x11.h",
@ -401,7 +401,14 @@ rtc_static_library("desktop_capture_generic") {
"linux/x_window_property.cc",
"linux/x_window_property.h",
]
configs += [ "//build/config/linux:x11" ]
libs = [
"X11",
"Xcomposite",
"Xdamage",
"Xext",
"Xfixes",
"Xrender",
]
if (build_with_mozilla) {
sources += [
@ -414,7 +421,7 @@ rtc_static_library("desktop_capture_generic") {
}
}
if (!is_win && !is_mac && !rtc_use_x11 && !rtc_use_pipewire) {
if (!is_win && !is_mac && !rtc_use_x11_extensions && !rtc_use_pipewire) {
sources += [
"mouse_cursor_monitor_null.cc",
"screen_capturer_null.cc",

View File

@ -950,17 +950,6 @@ 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",

View File

@ -242,6 +242,10 @@ 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
@ -250,8 +254,9 @@ 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 || rtc_use_pipewire))
rtc_desktop_capture_supported =
(is_win && current_os != "winuwp") || is_mac ||
(is_linux && (rtc_use_x11_extensions || rtc_use_pipewire))
###############################################################################
# Templates