diff mbox series

[v4l-utils,v1] meson: re-enable qv4l2 without Qt OpenGL support

Message ID 20230330200100.4363-1-ps.report@gmx.net
State Superseded
Headers show
Series [v4l-utils,v1] meson: re-enable qv4l2 without Qt OpenGL support | expand

Commit Message

Peter Seiderer March 30, 2023, 8:01 p.m. UTC
Re-enable qv4l2 without Qt OpenGL support (as possible with the
legacy autoconf/automake build system).

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 meson.build               | 10 ++++++----
 utils/qv4l2/meson.build   |  3 ++-
 utils/qvidcap/meson.build |  2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)
diff mbox series

Patch

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..044d8297 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