From b96d560f0add71179e9358596ac5eef92c744f8d Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 10 Jan 2023 22:50:09 +0530 Subject: [PATCH] meson: Only enable cargo features when options are enabled Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/285 Part-of: --- meson.build | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index fc2b0684..cebe435a 100644 --- a/meson.build +++ b/meson.build @@ -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