[PATCH v4l-utils v2] meson: re-enable qv4l2 without Qt OpenGL support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Re-enable qv4l2 without Qt OpenGL support (as possible with the
legacy autoconf/automake build system).

Signed-off-by: Peter Seiderer <ps.report@xxxxxxx>
---
Changes v1 -> v2:
  - add qvidcap missing additional dep_qt5_opengl dependency
---
 meson.build               | 10 ++++++----
 utils/qv4l2/meson.build   |  3 ++-
 utils/qvidcap/meson.build |  3 ++-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/meson.build b/meson.build
index 1e76b0f4..b27450ea 100644
--- a/meson.build
+++ b/meson.build
@@ -70,8 +70,7 @@ if dep_alsa.found()
     conf.set('HAVE_ALSA', 1)
 endif
 
-dep_gl = dependency('gl', required : get_option('qvidcap').enabled() or
-                                     get_option('qv4l2').enabled())
+dep_gl = dependency('gl', required : get_option('qvidcap').enabled())
 dep_glu = dependency('glu', required : false)
 
 dep_jsonc = dependency('json-c', required : get_option('v4l2-tracer'), version : '>=0.15')
@@ -80,9 +79,12 @@ dep_libdl = cc.find_library('dl')
 dep_libelf = cc.find_library('elf', required : get_option('bpf'))
 dep_libm = cc.find_library('m')
 dep_librt = cc.find_library('rt')
-dep_qt5 = dependency('qt5', modules: ['Core', 'Gui', 'Widgets', 'OpenGL'],
+dep_qt5 = dependency('qt5', modules: ['Core', 'Gui', 'Widgets'],
                      required : get_option('qvidcap').enabled() or get_option('qv4l2').enabled())
 
+dep_qt5_opengl = dependency('qt5', modules: ['OpenGL'],
+                     required : get_option('qvidcap').enabled())
+
 dep_libbpf = dependency('libbpf', required : get_option('bpf'), version : '>=0.7')
 
 dep_sdl = dependency('SDL2', required: false)
@@ -291,7 +293,7 @@ qt5_opengl_test = '''
 #endif
 '''
 have_qt5_opengl = cpp.compiles(qt5_opengl_test,
-                               dependencies : [dep_gl, dep_qt5],
+                               dependencies : [dep_gl, dep_qt5, dep_qt5_opengl],
                                args : '-fPIC')
 if have_qt5_opengl
     conf.set('HAVE_QTGL', 1)
diff --git a/utils/qv4l2/meson.build b/utils/qv4l2/meson.build
index 54676be8..4860e331 100644
--- a/utils/qv4l2/meson.build
+++ b/utils/qv4l2/meson.build
@@ -1,4 +1,4 @@
-if get_option('qv4l2').disabled() or not dep_gl.found() or not dep_qt5.found()
+if get_option('qv4l2').disabled() or not dep_qt5.found()
     subdir_done()
 endif
 
@@ -33,6 +33,7 @@ qv4l2_deps = [
     dep_libv4l2util,
     dep_libv4lconvert,
     dep_qt5,
+    dep_qt5_opengl,
     dep_threads,
 ]
 
diff --git a/utils/qvidcap/meson.build b/utils/qvidcap/meson.build
index faae18fb..63d76f29 100644
--- a/utils/qvidcap/meson.build
+++ b/utils/qvidcap/meson.build
@@ -4,7 +4,7 @@ if qvidcap_option.enabled() and not have_qt5_opengl
     error('qvidcap enabled but Qt5 is missing OpenGL support')
 endif
 
-if qvidcap_option.disabled() or not dep_gl.found() or not dep_qt5.found() or not have_qt5_opengl
+if qvidcap_option.disabled() or not dep_gl.found() or not dep_qt5_opengl.found() or not have_qt5_opengl
     subdir_done()
 endif
 
@@ -30,6 +30,7 @@ qvidcap_deps = [
     dep_libv4l2util,
     dep_libv4lconvert,
     dep_qt5,
+    dep_qt5_opengl,
     dep_threads,
 ]
 
-- 
2.40.0


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux