[Spice-devel] [PATCH spice-gtk 17/34] meson: switch usbredir option to auto feature
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Mon Jan 7 08:00:46 UTC 2019
From: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
.gitlab-ci.yml | 1 -
meson.build | 15 +++++----------
meson_options.txt | 3 +--
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fabe29e..125dbd7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,7 +48,6 @@ makecheck_simple-meson:
-Dlz4=false
-Dsasl=false
-Dsmartcard=false
- -Dusbredir=false
-Ddbus=false || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
diff --git a/meson.build b/meson.build
index 69f7e1f..18e330f 100644
--- a/meson.build
+++ b/meson.build
@@ -175,16 +175,11 @@ endif
# usbredir
spice_gtk_has_usbredir = false
-if get_option('usbredir')
- deps = {'libusbredirparser-0.5': '>= 0.5',
- 'libusbredirhost' : '>= 0.4.2',
- 'libusb-1.0' : '>= 1.0.16'}
-
- foreach dep, version : deps
- usb_dep = dependency(dep, version : version)
- spice_glib_deps += usb_dep
- endforeach
-
+d = dependency('libusbredirparser-0.5', required : get_option('usbredir'))
+if d.found()
+ spice_glib_deps += d
+ spice_glib_deps += dependency('libusbredirhost', version : '>= 0.4.2')
+ spice_glib_deps += dependency('libusb-1.0', version : '>= 1.0.16')
spice_gtk_config_data.set('USE_USBREDIR', '1')
spice_gtk_has_usbredir = true
endif
diff --git a/meson_options.txt b/meson_options.txt
index 404026d..6aab3af 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,8 +16,7 @@ option('builtin-mjpeg',
description : 'Enable the builtin mjpeg video decoder')
option('usbredir',
- type : 'boolean',
- value : true,
+ type : 'feature',
description : 'Enable usbredir support')
option('polkit',
--
2.20.1.2.gb21ebb671b
More information about the Spice-devel
mailing list