meson: avoid passing the --features flag to wrapper when empty

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1184>
This commit is contained in:
Lily Foster 2023-04-18 16:26:11 -04:00
parent 721d17e181
commit 760e97c7e7

View file

@ -355,6 +355,10 @@ foreach plugin_name, details: plugins
endif endif
endforeach endforeach
feature_args = []
if features.length() > 0
feature_args += ['--features', features]
endif
plugins_install_dir = get_option('libdir') / 'gstreamer-1.0' plugins_install_dir = get_option('libdir') / 'gstreamer-1.0'
pkgconfig_install_dir = get_option('libdir') / 'pkgconfig' pkgconfig_install_dir = get_option('libdir') / 'pkgconfig'
@ -397,10 +401,9 @@ rs_plugins = custom_target('gst-plugins-rs',
get_option('prefix'), get_option('prefix'),
get_option('libdir'), get_option('libdir'),
'--packages', packages, '--packages', packages,
'--features', features,
'--depfile', '@DEPFILE@', '--depfile', '@DEPFILE@',
'--lib-suffixes', library_suffixes, '--lib-suffixes', library_suffixes,
] + extra_args) ] + feature_args + extra_args)
plugins = rs_plugins.to_list() plugins = rs_plugins.to_list()
@ -521,10 +524,9 @@ if get_option('examples').allowed() and examples.length() > 0
get_option('libdir'), get_option('libdir'),
'--depfile', '@DEPFILE@', '--depfile', '@DEPFILE@',
'--packages', packages, '--packages', packages,
'--features', features,
'--examples', examples, '--examples', examples,
'--exe-suffix', exe_suffix, '--exe-suffix', exe_suffix,
]) ] + feature_args)
endif endif
test('tests', test('tests',