Re: [PATCH spice-server 2/2] fixup! Add support for building with meson/ninja

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

 



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_@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_@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@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]