gst-examples: continue if webrtc deps are not satisfied
authorStéphane Cerveau <scerveau@collabora.com>
Thu, 21 Apr 2022 10:17:27 +0000 (12:17 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 14 May 2022 09:49:33 +0000 (09:49 +0000)
The WebRTC examples are disabled if one dependency is
not satisfied, especially libsoup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2261>

subprojects/gst-examples/webrtc/meson.build

index 5efc2ec..fcca463 100644 (file)
@@ -3,9 +3,14 @@ gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
     fallback : ['gst-plugins-base', 'sdp_dep'])
 
 libsoup_dep = dependency('libsoup-2.4', version : '>=2.48',
-    fallback : ['libsoup', 'libsoup_dep'])
+    fallback : ['libsoup', 'libsoup_dep'], required: false)
 json_glib_dep = dependency('json-glib-1.0',
-    fallback : ['json-glib', 'json_glib_dep'])
+    fallback : ['json-glib', 'json_glib_dep'], required: false)
+
+if not libsoup_dep.found() or not json_glib_dep.found()
+    message('WebRTC examples are disabled because some dependencies are missing.')
+    subdir_done()
+endif
 
 py3_mod = import('python3')
 py3 = py3_mod.find_python()