Make building with X11 libraries optional.
Desktop capturing on Linux will be disabled in this case, but everything
can be built without any X11 development libraries installed.
BUG=webrtc:5716,webrtc:8319
Change-Id: I01bd6a4b02816b407be19476e22ff073d264b496
Reviewed-on: https://webrtc-review.googlesource.com/32360
Reviewed-by: Henrik Andreassson (OOO until Jan 2) <henrika@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21462}
diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn
index ef48180..46cac11 100644
--- a/modules/audio_device/BUILD.gn
+++ b/modules/audio_device/BUILD.gn
@@ -195,8 +195,9 @@
]
defines += [ "LINUX_ALSA" ]
libs = [ "dl" ]
- if (use_x11) {
+ if (rtc_use_x11) {
libs += [ "X11" ]
+ defines += [ "WEBRTC_USE_X11" ]
}
if (rtc_include_pulse_audio) {
sources += [