[Spice-devel] [PATCH spice-gtk 14/34] meson: switch gtk option to auto feature
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Mon Jan 7 08:00:43 UTC 2019
From: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
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
More information about the Spice-devel
mailing list