qmlglsink: fix build on EGL platform without X11 headers
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 3 Dec 2019 10:36:07 +0000 (11:36 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 4 Dec 2019 22:38:49 +0000 (22:38 +0000)
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

ext/qt/meson.build

index 40cc9e0..badcae2 100644 (file)
@@ -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