[Spice-devel] [PATCH spice-gtk 15/34] meson: switch webdav option to auto feature
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Mon Jan 7 08:00:44 UTC 2019
From: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
.gitlab-ci.yml | 1 -
meson.build | 14 +++++++++-----
meson_options.txt | 3 +--
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5d4da85..e913da4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,6 @@ makecheck_simple-meson:
script:
- meson build -Dauto_features=disabled
-Dlz4=false
- -Dwebdav=false
-Dsasl=false
-Dpulse=false
-Dsmartcard=false
diff --git a/meson.build b/meson.build
index ebc846e..9bb56c3 100644
--- a/meson.build
+++ b/meson.build
@@ -141,11 +141,15 @@ endif
# webdav
spice_gtk_has_phodav = false
-if get_option('webdav')
- spice_glib_deps += dependency('libphodav-2.0')
- spice_glib_deps += dependency('libsoup-2.4', version : '>= 2.49.91')
- spice_gtk_config_data.set('USE_PHODAV', '1')
- spice_gtk_has_phodav = true
+d = dependency('libphodav-2.0', required: get_option('webdav'))
+if d.found()
+ spice_glib_deps += d
+ d = dependency('libsoup-2.4', version : '>= 2.49.91', required: get_option('webdav'))
+ if d.found()
+ spice_glib_deps += d
+ spice_gtk_config_data.set('USE_PHODAV', '1')
+ spice_gtk_has_phodav = true
+ endif
endif
# pulse
diff --git a/meson_options.txt b/meson_options.txt
index fc130dc..3f1da89 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,8 +3,7 @@ option('gtk',
description: 'Enable gtk+')
option('webdav',
- type : 'boolean',
- value : true,
+ type : 'feature',
description: 'Enable webdav support')
option('pulse',
--
2.20.1.2.gb21ebb671b
More information about the Spice-devel
mailing list