meson: Make gstreamer-gl dependency optional

Minimal systems like docker containers may not have GL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1604>
This commit is contained in:
Nirbheek Chauhan 2024-06-06 14:51:11 +05:30 committed by GStreamer Marge Bot
parent 3d4d785a2a
commit 4eed615871

View file

@ -86,7 +86,7 @@ if get_option('tests').allowed()
deps += [['gstreamer-check-1.0', 'gstreamer', 'gst_check_dep', 'gst_check']] deps += [['gstreamer-check-1.0', 'gstreamer', 'gst_check_dep', 'gst_check']]
endif endif
if get_option('gtk4').allowed() if get_option('gtk4').allowed()
deps += [['gstreamer-gl-1.0', 'gst-plugins-base', 'gst_gl_dep', 'gstgl']] deps += [['gstreamer-gl-1.0', 'gst-plugins-base', 'gst_gl_dep', 'gstgl', get_option('gtk4')]]
endif endif
if get_option('threadshare').allowed() or get_option('rtsp').allowed() if get_option('threadshare').allowed() or get_option('rtsp').allowed()
deps += [['gstreamer-net-1.0', 'gstreamer', 'gst_net_dep', 'gst_net']] deps += [['gstreamer-net-1.0', 'gstreamer', 'gst_net_dep', 'gst_net']]
@ -97,7 +97,7 @@ deps_cache += {'glib-2.0': glib_dep}
foreach d: deps foreach d: deps
dep = dependency(d[0], version: gst_req, dep = dependency(d[0], version: gst_req,
fallback : [d[1], d[2]]) fallback : [d[1], d[2]], required: d.get(4, true))
set_variable(d[2], dep) set_variable(d[2], dep)
deps_cache += {d[0]: dep} deps_cache += {d[0]: dep}
if dep.type_name() == 'internal' if dep.type_name() == 'internal'