diff options
author | Haihua Hu <jared.hu@nxp.com> | 2016-06-27 18:15:08 +0800 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-08-16 02:33:31 +1000 |
commit | cdba73a99a87f7ce77ed610aae1d2679502649ea (patch) | |
tree | aec3982e206ff2a63bc526c8a1e712f80497c871 | |
parent | 3a0b62755b75ab7f498482f647a7d46558416ea1 (diff) | |
download | gstreamer-plugins-bad-cdba73a99a87f7ce77ed610aae1d2679502649ea.tar.gz |
qmlglsink: Fix build error when don't have QPA installed.
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
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | ext/qt/qtitem.cc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index dd621b556..7a75866d6 100644 --- a/configure.ac +++ b/configure.ac @@ -2844,7 +2844,10 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [ HAVE_QT_WINDOWING="no" QT_VERSION="`$PKG_CONFIG --modversion Qt5Core`" QPA_INCLUDE_PATH=`$PKG_CONFIG --variable=includedir Qt5Core`/QtGui/${QT_VERSION}/QtGui - AC_SUBST(QPA_INCLUDE_PATH) + AS_IF([test -f "$QPA_INCLUDE_PATH/qpa/qplatformnativeinterface.h"], [ + AC_SUBST(QPA_INCLUDE_PATH) + HAVE_QT_QPA_HEADER="yes" + ], [AC_MSG_NOTICE([Cannot find QPA])]) if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [ AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed]) @@ -2853,7 +2856,7 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [ HAVE_QT_WINDOWING="yes" ], [AC_MSG_NOTICE([Could not find Qt X11 integration])]) fi - if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then + if test "x$GST_GL_HAVE_WINDOW_WAYLAND" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1" -a "x$HAVE_QT_QPA_HEADER" = "xyes"; then PKG_CHECK_MODULES(QT_WAYLAND, Qt5WaylandClient, [ AC_DEFINE([HAVE_QT_WAYLAND], [], [Define if Qt Wayland integration is installed]) diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 67820b993..c306c6dbd 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -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 |