[Spice-devel] [PATCH spice-gtk v2 13/15] meson: switch vapi to auto feature

Frediano Ziglio fziglio at redhat.com
Wed Jan 9 10:09:33 UTC 2019


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Removed unused vapigen/vapidir variables as well.

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 meson.build       | 9 +++++----
 meson_options.txt | 3 +--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meson.build b/meson.build
index 8f8b9f85..94d660a6 100644
--- a/meson.build
+++ b/meson.build
@@ -281,10 +281,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
   spice_gtk_has_vala = true
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 84c596f4..2e605b77 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -49,8 +49,7 @@ option('introspection',
     description: 'Check for GObject instrospection requirements')
 
 option('vapi',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Check for vala requirements')
 
 option('alignment-checks',
-- 
2.20.1



More information about the Spice-devel mailing list