summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <etrunko@redhat.com>2018-07-26 14:26:47 -0300
committerFrediano Ziglio <fziglio@redhat.com>2018-07-27 10:31:53 +0100
commitd6c05fb0465c130c6f07c8b575fb3d5691cb1cc1 (patch)
tree8dd9d4de382fabe26bf43e82c9ae99a76eda3427 /meson.build
parent12af62316dfe4ec9bee24e2b6166e978d96bce92 (diff)
Meson: Make use of 'feature' option type introduced in version 0.47
This built-in type is used instead of the tri-state string combo (auto/true/false), simplifying the dependency checks. http://mesonbuild.com/Build-options.html#features Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 4 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index dcce055..6fa67dc 100644
--- a/meson.build
+++ b/meson.build
@@ -115,13 +115,10 @@ endforeach
optional_deps = {'celt051' : '>= 0.5.1.1',
'opus' : '>= 0.9.14'}
foreach dep, version : optional_deps
- option_value = get_option(dep)
- if option_value != 'false'
- d = dependency(dep, required: (option_value == 'true'), version : version)
- if d.found()
- spice_common_deps += d
- spice_common_config_data.set('HAVE_@0@'.format(dep.underscorify().to_upper()), '1')
- endif
+ d = dependency(dep, required : get_option(dep), version : version)
+ if d.found()
+ spice_common_deps += d
+ spice_common_config_data.set('HAVE_@0@'.format(dep.underscorify().to_upper()), '1')
endif
endforeach