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)
 >  endif

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


Reply via email to