[Spice-devel] [PATCH spice-server 2/2] fixup! Add support for building with meson/ninja
Eduardo Lima (Etrunko)
etrunko at redhat.com
Thu Jul 26 17:17:10 UTC 2018
On 26/07/18 14:14, Eduardo Lima (Etrunko) wrote:
> Make use of built-in 'feature' option type, instead of tri-combo strings
> (auto/true/false)
>
Note that this commit requires the features commit in spice-common at
the same time, because it is incompatible with string type.
> http://mesonbuild.com/Build-options.html#features
> ---
> meson.build | 11 ++++-------
> meson_options.txt | 9 ++-------
> 2 files changed, 6 insertions(+), 14 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index fee9c8df..60a53ca2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -97,13 +97,10 @@ endforeach
> optional_deps = {'celt051' : '>= 0.5.1.1',
> 'opus' : '>= 0.9.14'}
> foreach dep, version : optional_deps
> - option_value = get_option(dep)
> - if option_value != 'false'
> - d = dependency(dep, required: (option_value == 'true'), version : version)
> - if d.found()
> - spice_server_deps += d
> - spice_server_config_data.set('HAVE_ at 0@'.format(dep.underscorify().to_upper()), '1')
> - endif
> + d = dependency(dep, required : get_option(dep), version : version)
> + if d.found()
> + spice_server_deps += d
> + spice_server_config_data.set('HAVE_ at 0@'.format(dep.underscorify().to_upper()), '1')
> endif
> endforeach
>
> diff --git a/meson_options.txt b/meson_options.txt
> index 86f4633d..9568c97e 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -14,16 +14,11 @@ option('sasl',
> description : 'Use cyrus SASL authentication')
>
> option('celt051',
> - type : 'combo',
> - choices : ['true', 'false', 'auto'],
> - value : 'auto',
> - yield : true,
> + type : 'feature',
> description: 'Enable celt051 audio codec')
>
> option('opus',
> - type : 'combo',
> - choices : ['true', 'false', 'auto'],
> - yield : true,
> + type : 'feature',
> description: 'Enable Opus audio codec')
>
> option('smartcard',
>
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the Spice-devel
mailing list