From: Philipp Zabel
Date: Tue, 3 Dec 2019 10:36:07 +0000 (+0100)
Subject: qmlglsink: fix build on EGL platform without X11 headers
X-Git-Tag: 1.19.3~509^2~800
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c47a585052fba6830a2cddd8caa18e2305596ed0;p=platform%2Fupstream%2Fgstreamer.git
qmlglsink: fix build on EGL platform without X11 headers
If Mesa is built without X11 headers, building against Mesa EGL headers
requires a dependency on egl.pc, to define MESA_EGL_NO_X11_HEADERS.
This fixes a build error when compiling ext/qt/gstqtglutility.cc:
In file included from /usr/include/EGL/egl.h:39,
from /usr/include/gstreamer-1.0/gst/gl/egl/gstegl.h:44,
from ../gst-plugins-good-1.16.1/ext/qt/gstqtglutility.cc:43:
/usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
---
diff --git a/ext/qt/meson.build b/ext/qt/meson.build
index 40cc9e0..badcae2 100644
--- a/ext/qt/meson.build
+++ b/ext/qt/meson.build
@@ -89,6 +89,8 @@ if have_cxx and build_gstgl
if gst_gl_have_platform_egl
# Embedded linux (e.g. i.MX6) with or without windowing support
qt_defines += ['-DHAVE_QT_EGLFS']
+ egl_dep = dependency('egl', required : false)
+ optional_deps += egl_dep
have_qt_windowing = true
if have_qpa_include
# Wayland windowing