[PATCH spice-gtk 14/34] meson: switch gtk option to auto feature

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

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

diff --git a/meson.build b/meson.build
index 91d0742..ebc846e 100644
--- a/meson.build
+++ b/meson.build
@@ -128,8 +128,10 @@ endforeach
 # gtk
 spice_gtk_has_gtk = false
 gtk_version_required = '3.22'
-if get_option('gtk')
-  spice_gtk_deps += dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required))
+d = dependency('gtk+-3.0', version : '>= @0@'.format(gtk_version_required),
+               required: get_option('gtk'))
+if d.found()
+  spice_gtk_deps += d
   if spice_gtk_host_system != 'windows'
     spice_gtk_deps += dependency('epoxy')
     spice_gtk_deps += dependency('x11')
diff --git a/meson_options.txt b/meson_options.txt
index 515a86b..fc130dc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,5 @@
 option('gtk',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     description: 'Enable gtk+')
 
 option('webdav',
-- 
2.20.1.2.gb21ebb671b

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