From f1272e547d3e0b49264b2570de5c010fe425f5ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 18 Aug 2018 12:37:48 +0100 Subject: [PATCH] meson: gl: return not-found dependency instead of disabler if opengl is disabled This allows consumers of the gstgl dependency where gstgl is optional to do things like: config_data.set('HAVE_GST_GL', gstgl_dep.found()) deps = [gstvideo_dep, gstgl_dep] meaning they can still use the dep unconditionally. With the disabler we would just disable the whole target even if the gstgl part was an optional extra. We can add an option to dependency() later to let users/consumers of the dep decide if they want a not-found dependency or a disabler instead. --- gst-libs/gst/gl/meson.build | 2 +- tests/examples/meson.build | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index be0c4ef..8a5a83f 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -1,6 +1,6 @@ if get_option('gl').disabled() message('GStreamer OpenGL integration disabled via options.') - gstgl_dep = disabler() + gstgl_dep = dependency('', required: false) build_gstgl = false subdir_done() endif diff --git a/tests/examples/meson.build b/tests/examples/meson.build index 6d97a5c..fe70151 100644 --- a/tests/examples/meson.build +++ b/tests/examples/meson.build @@ -5,7 +5,9 @@ subdir('decodebin_next') subdir('encoding') subdir('fft') subdir('gio') -subdir('gl') +if build_gstgl + subdir('gl') +endif subdir('overlay') subdir('playback') subdir('playrec') -- 2.7.4