qmlglsink: Fix build error when don't have QPA installed.
authorHaihua Hu <jared.hu@nxp.com>
Mon, 27 Jun 2016 10:15:08 +0000 (18:15 +0800)
committerMatthew Waters <matthew@centricular.com>
Mon, 27 Jun 2016 12:44:56 +0000 (22:44 +1000)
Check header file existance and wrap the header file include
in the necessary #ifdef to avoid build error.

https://bugzilla.gnome.org/show_bug.cgi?id=767553

ext/qt/qtitem.cc

index 67820b9..c306c6d 100644 (file)
@@ -32,7 +32,6 @@
 #include <QtGui/QGuiApplication>
 #include <QtQuick/QQuickWindow>
 #include <QtQuick/QSGSimpleTextureNode>
-#include <qpa/qplatformnativeinterface.h>
 
 #if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined (HAVE_QT_X11)
 #include <QX11Info>
@@ -41,6 +40,7 @@
 #endif
 
 #if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_WAYLAND)
+#include <qpa/qplatformnativeinterface.h>
 #include <gst/gl/wayland/gstgldisplay_wayland.h>
 #endif