[Spice-devel] [PATCH spice-gtk 17/34] meson: switch usbredir option to auto feature
Christophe Fergeau
cfergeau at redhat.com
Mon Jan 7 14:22:29 UTC 2019
On Mon, Jan 07, 2019 at 12:00:46PM +0400, marcandre.lureau at redhat.com wrote:
> 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')
Thinking of the behaviour that we want with 'auto', shouldn't it be
something like (pseudo-code) this?
d1 = dependency('libusbredirparser-0.5', required : get_option('usbredir'))
d2 = dependency('libusbredirhost', version : '>= 0.4.2', required : get_option('usbredir')))
d3 = dependency('libusb-1.0', version : '>= 1.0.16', required : get_option('usbredir')))
if d1.found() and d2.found() and d3.found():
spice_glib_deps += [ d1, d2, d3 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190107/b570637f/attachment.sig>
More information about the Spice-devel
mailing list