|
From: | Paolo Bonzini |
Subject: | Re: [PULL 09/12] configure, meson: convert libusb detection to meson |
Date: | Fri, 25 Jun 2021 10:50:44 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 25/06/21 04:09, 罗勇刚(Yonggang Luo) wrote:
> +if not get_option('libusb').auto() or have_system > + libusb = dependency('libusb-1.0', required: get_option('libusb'), > + version: '>=1.0.13', method: 'pkg-config', > + kwargs: static_kwargs) > endifHi, I am not sure if it's right, but I think the dection may need convert to this:``` if not get_option('libusb').disabled() libusb = dependency('libusb-1.0', required: get_option('libusb').auto(), version: '>=1.0.13', method: 'pkg-config', kwargs: static_kwargs)
No, Meson knows what to do with feature objects passed to "required". With Meson 0.59 however it will be possible to write libusb = dependency('libusb-1.0', required: get_option('libusb').disable_auto_if(not have_system), version: '>=1.0.13', method: 'pkg-config', kwargs: static_kwargs) without any if. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |