[PATCH] meson: Make options accessible through parent project

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

 



When building either spice-server or spice-gtk, spice-common should
inherit the command line options from the parent project. This is done
by adding the 'yield' keyword for the opus and celt051 options.

It is also required to add a smartcard option so that we can bypass the
checks if the user wants to.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
---
 meson.build       | 20 +++++++++++---------
 meson_options.txt |  8 ++++++++
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/meson.build b/meson.build
index 466bb06..28e7c29 100644
--- a/meson.build
+++ b/meson.build
@@ -141,15 +141,17 @@ if get_option('python-checks')
 endif
 
 # smartcard check
-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')
-else
-  smartcard012_dep = dependency('libcacard', required : false, version : '>= 0.1.2')
-  if smartcard012_dep.found()
-    spice_common_deps += smartcard012_dep
-    spice_common_config_data.set('USE_SMARTCARD_012', '1')
+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')
+  else
+    smartcard012_dep = dependency('libcacard', required : false, version : '>= 0.1.2')
+    if smartcard012_dep.found()
+      spice_common_deps += smartcard012_dep
+      spice_common_config_data.set('USE_SMARTCARD_012', '1')
+    endif
   endif
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 915a9df..b88f209 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,13 +14,21 @@ option('celt051',
     type : 'combo',
     choices : ['true', 'false', 'auto'],
     value : 'auto',
+    yield : true,
     description: 'Enable celt051 audio codec')
 
 option('opus',
     type : 'combo',
     choices : ['true', 'false', 'auto'],
+    yield : true,
     description: 'Enable Opus audio codec')
 
+option('smartcard',
+    type : 'boolean',
+    value : true,
+    yield : true,
+    description : 'Enable smartcard support')
+
 option('python-checks',
     type : 'boolean',
     value : true,
-- 
2.14.4

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