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

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Mon Jan 7 08:00:57 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 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
   spice_gtk_has_vala = true
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 84c596f..2e605b7 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.2.gb21ebb671b



More information about the Spice-devel mailing list