meson: Replace disabler dependencies with not-found dependencies

If a plugin gets disabled due to a `disabler()` dependency, the plugin
docs build itself will get disabled because `all_plugins_paths` will
become a disabler.

This was actually happening with opencv on systems that don't have
opencv available, and could happen with libsoup too if the build files
change in the future.

Let's avoid wasting hours of debugging for people. A not-found
dependency has the same effect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8582>
This commit is contained in:
Nirbheek Chauhan 2025-03-04 15:01:24 +05:30 committed by GStreamer Marge Bot
parent a42bcf7865
commit e2e6daf362
3 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ plugin_sources += {
'opencv': pathsep.join(doc_sources)
}
if get_option('opencv').disabled() or not opencv_dep.found()
if get_option('opencv').disabled() or not opencv_dep.found() or not gstopencv_dep.found()
subdir_done()
endif

View File

@ -1,5 +1,5 @@
opencv_dep = disabler()
gstopencv_dep = disabler()
opencv_dep = dependency('', required: false)
gstopencv_dep = dependency('', required: false)
opencv_opt = get_option('opencv')
if opencv_opt.disabled()
subdir_done()

View File

@ -11,8 +11,8 @@
# In cases 3,4: we create one static_library() target that links to libsoup
# In cases 2,4: we create one shared_library() target that dlopen()s libsoup
libsoup2_dep = disabler()
libsoup3_dep = disabler()
libsoup2_dep = dependency('', required: false)
libsoup3_dep = dependency('', required: false)
soup_ver_opt = get_option('soup-version')
default_library = get_option('default_library')