[Spice-devel] [PATCH spice-gtk 22/34] build-sys: switch smartcard option to auto feature
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Mon Jan 7 08:00:51 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 | 5 +++--
meson_options.txt | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a3cb6ad..750e801 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,7 +45,6 @@ makecheck_simple:
makecheck_simple-meson:
script:
- meson build -Dauto_features=disabled
- -Dsmartcard=false
-Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
diff --git a/meson.build b/meson.build
index d2df33e..26d19ed 100644
--- a/meson.build
+++ b/meson.build
@@ -305,8 +305,9 @@ endif
# smartcard check
spice_gtk_has_smartcard = false
-if get_option('smartcard')
- spice_glib_deps += dependency('libcacard', version : '>= 2.5.1')
+d = dependency('libcacard', version : '>= 2.5.1', required : get_option('smartcard'))
+if d.found()
+ spice_glib_deps += d
spice_gtk_config_data.set('USE_SMARTCARD', '1')
endif
diff --git a/meson_options.txt b/meson_options.txt
index a16fe49..a3995f8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -79,6 +79,5 @@ option('opus',
description: 'Enable Opus audio codec')
option('smartcard',
- type : 'boolean',
- value : true,
+ type : 'feature',
description : 'Enable smartcard support')
--
2.20.1.2.gb21ebb671b
More information about the Spice-devel
mailing list