@@ -143,8 +143,16 @@ if test "x$qt_pkgconfig" = "xtrue"; then
AC_SUBST(MOC)
AC_SUBST(UIC)
AC_SUBST(RCC)
-# disable QTGL for qt5 because qv4l2 crash
- qt_pkgconfig_gl=false
+ PKG_CHECK_MODULES(QT5GL, [Qt5OpenGL >= 5.0 gl], [qt_pkgconfig_gl=true], [qt_pkgconfig_gl=false])
+ if test "x$qt_pkgconfig_gl" = "xtrue"; then
+ QTGL_CFLAGS="$QT5GL_CFLAGS -fPIC"
+ QTGL_LIBS="$QT5GL_LIBS"
+ AC_SUBST(QT_CFLAGS)
+ AC_SUBST(QT_LIBS)
+ AC_DEFINE([HAVE_QTGL], [1], [qt has opengl support])
+ else
+ AC_MSG_WARN(Qt5 OpenGL is not available)
+ fi
else
PKG_CHECK_MODULES(QT, [QtCore >= 4.0 QtGui >= 4.0], [qt_pkgconfig=true], [qt_pkgconfig=false])
if test "x$qt_pkgconfig" = "xtrue"; then
@@ -8,12 +8,9 @@ CONFIG += debug
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-#
-# qt5: opengl support for disabled (will crash on startup)
-#
-# qt4: to disable opengl suppport comment out the following
+# opengl: to disable opengl suppport comment out the following
# line and the line '#define HAVE_QTGL 1' from ../../config.h
-lessThan(QT_MAJOR_VERSION, 5): QT += opengl
+QT += opengl
INCLUDEPATH += $$PWD/../..
INCLUDEPATH += $$PWD/../v4l2-ctl/
Signed-off-by: Peter Seiderer <ps.report@gmx.net> --- configure.ac | 12 ++++++++++-- utils/qv4l2/qv4l2.pro | 7 ++----- 2 files changed, 12 insertions(+), 7 deletions(-)