summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <etrunko@redhat.com>2018-07-20 15:40:22 -0300
committerFrediano Ziglio <fziglio@redhat.com>2018-07-23 18:43:42 +0100
commite2fad781ec439f3ef9a3590efb5b44f159a05132 (patch)
tree9b6e29f853d3622b4e745b9db25a0767c9bc051d
parent9b2c989dd918fe902c189ddfb2dcebc8085b5c14 (diff)
meson: Make options accessible through parent project
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@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--meson.build20
-rw-r--r--meson_options.txt8
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,