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>
This commit is contained in:
Eduardo Lima (Etrunko) 2018-07-20 15:40:22 -03:00 committed by Frediano Ziglio
parent 9b2c989dd9
commit e2fad781ec
2 changed files with 19 additions and 9 deletions

View File

@ -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

View File

@ -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,