[Spice-devel] [PATCH spice-gtk 19/34] meson: switch introspection option to auto feature

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Mon Jan 7 08:00:48 UTC 2019


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

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

diff --git a/meson.build b/meson.build
index 07e8227..4c9c05c 100644
--- a/meson.build
+++ b/meson.build
@@ -263,8 +263,9 @@ endif
 
 # introspection
 spice_gtk_has_introspection = false
-if get_option('introspection')
-  spice_glib_deps += dependency('gobject-introspection-1.0', version : '>= 0.94')
+d = dependency('gobject-introspection-1.0', version : '>= 0.94', required : get_option('introspection'))
+if d.found()
+  spice_glib_deps += d
   spice_gtk_has_introspection = true
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 889c976..e92f931 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -44,8 +44,7 @@ option('coroutine',
     description : 'Use ucontext or GThread for coroutines')
 
 option('introspection',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Check for GObject instrospection requirements')
 
 option('vapi',
-- 
2.20.1.2.gb21ebb671b



More information about the Spice-devel mailing list