meson: Only enable cargo features when options are enabled

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/285

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1041>
This commit is contained in:
Nirbheek Chauhan 2023-01-10 22:50:09 +05:30
parent bc95a30db6
commit b96d560f0a

View file

@ -316,15 +316,20 @@ endif
if gst_dep.version().version_compare('>=1.21')
components = [
'', '-app', '-audio', '-base', '-check', '-net', '-pbutils',
'-plugin-tracers', '-rtp', '-sdp', '-utils', '-video', '-webrtc',
'-rtp', '-sdp', '-utils', '-video', '-webrtc',
]
if get_option('tracers').allowed()
components += '-plugin-tracers'
endif
foreach c: components
features += f'gst@c@/v1_22'
endforeach
features += ['gst-plugin-webrtc/gst1_22']
if get_option('webrtc').allowed()
features += 'gst-plugin-webrtc/gst1_22'
endif
endif
if find_program('nasm', required: false).found()
if get_option('rav1e').allowed() and find_program('nasm', required: false).found()
features += 'gst-plugin-rav1e/asm'
endif