[Spice-devel] [PATCH spice-common 4/4] meson: switch smartcard option to auto feature

Eduardo Lima (Etrunko) etrunko at redhat.com
Mon Feb 4 12:13:12 UTC 2019


In spice-gtk commit dbdf692909f7a2b272b06a674a38a1aeb4303032, the
smartcard option has been changed from boolean to feature, which
actually broke the option yeld, because the option type is incompatible
between superproject and subproject.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
 meson.build       | 10 ++++------
 meson_options.txt |  3 +--
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index d7b7d1a..f451f1c 100644
--- a/meson.build
+++ b/meson.build
@@ -147,12 +147,10 @@ if get_option('python-checks')
 endif
 
 # smartcard check
-if get_option('smartcard')
-  smartcard_dep = dependency('libcacard', required : false, version : '>= 2.5.1')
-  if smartcard_dep.found()
-    spice_common_deps += smartcard_dep
-    spice_common_config_data.set('USE_SMARTCARD', '1')
-  endif
+smartcard_dep = dependency('libcacard', required : get_option('smartcard'), version : '>= 2.5.1')
+if smartcard_dep.found()
+  spice_common_deps += smartcard_dep
+  spice_common_config_data.set('USE_SMARTCARD', '1')
 endif
 
 #
diff --git a/meson_options.txt b/meson_options.txt
index a90726a..7e9e704 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -27,8 +27,7 @@ option('recorder',
     description: 'Enable recorder instrumentation')
 
 option('smartcard',
-    type : 'boolean',
-    value : true,
+    type : 'feature',
     yield : true,
     description : 'Enable smartcard support')
 
-- 
2.20.1



More information about the Spice-devel mailing list