Re: [PATCH spice-common v2 2/2] Meson: Make use of 'feature' option type introduced in version 0.47

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/07/18 14:28, Eduardo Lima (Etrunko) wrote:
> This built-in type is used instead of the tri-state string combo
> (auto/true/false), simplifying the dependency checks.
> 
> http://mesonbuild.com/Build-options.html#features
> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
> ---
>  meson.build       | 11 ++++-------
>  meson_options.txt |  7 ++-----
>  2 files changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index dcce055..6fa67dc 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -115,13 +115,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_common_deps += d
> -      spice_common_config_data.set('HAVE_@0@'.format(dep.underscorify().to_upper()), '1')
> -    endif
> +  d = dependency(dep, required : get_option(dep), version : version)
> +  if d.found()
> +    spice_common_deps += d
> +    spice_common_config_data.set('HAVE_@0@'.format(dep.underscorify().to_upper()), '1')
>    endif
>  endforeach
>  
> diff --git a/meson_options.txt b/meson_options.txt
> index b88f209..2203b55 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -11,15 +11,12 @@ option('extra-checks',
>      description : 'Enable extra checks on code')
>  
>  option('celt051',
> -    type : 'combo',
> -    choices : ['true', 'false', 'auto'],
> -    value : 'auto',
> +    type : 'featue',


Fixed locally:  s/featue/feature

>      yield : true,
>      description: 'Enable celt051 audio codec')
>  
>  option('opus',
> -    type : 'combo',
> -    choices : ['true', 'false', 'auto'],
> +    type : 'feature',
>      yield : true,
>      description: 'Enable Opus audio codec')
>  
> 


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko@xxxxxxxxxx
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]