Re: [PATCH spice-gtk 28/34] meson: switch vapi to auto feature

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

 



On Mon, Jan 07, 2019 at 12:00:57PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> Removed unused vapigen/vapidir variables as well.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> ---
>  meson.build       | 9 +++++----
>  meson_options.txt | 3 +--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 9896151..7e0c68d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -279,10 +279,11 @@ endif
>  
>  # vala (depends on introspection)
>  spice_gtk_has_vala = false
> -if spice_gtk_has_introspection and get_option('vapi')
> -  vapigen_dep = dependency('vapigen')
> -  vapidir = vapigen_dep.get_pkgconfig_variable('vapidir')
> -  vapigen = dependency('vapigen').get_pkgconfig_variable('vapigen')
> +d = dependency('vapigen', required : get_option('vapi'))
> +if d.found()
> +  if not spice_gtk_has_introspection
> +    error('VAPI support requested without introspection')
> +  endif

I'd be a bit more sophisticated here in order to handle 'auto', maybe
something like this:

if not spice_gtk_has_introspection:
    if get_option('vapi').enabled()
        error('VAPI support requested without introspection')
    endif
    spice_gtk_has_vala = false
endif
spice_gtk_has_vala = true


Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]