All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: luoyonggang@gmail.com
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
	qemu-level <qemu-devel@nongnu.org>
Subject: Re: [PULL 09/12] configure, meson: convert libusb detection to meson
Date: Fri, 25 Jun 2021 10:50:44 +0200	[thread overview]
Message-ID: <91cd2b0f-8caf-f2b9-8022-3eddfcb96828@redhat.com> (raw)
In-Reply-To: <CAE2XoE9XWqyt3VM-miUdUy-+=nwNEPnUMgk62ea7Fv6eF16cOw@mail.gmail.com>

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	other threads:[~2021-06-25  8:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 12:14 [PULL 00/12] Misc, mostly meson patches for 2021-06-23 Paolo Bonzini
2021-06-23 12:14 ` [PULL 01/12] target/i386: kvm: add support for TSC scaling Paolo Bonzini
2021-06-23 12:14 ` [PULL 02/12] meson: drop unused CONFIG_GCRYPT_HMAC Paolo Bonzini
2021-06-23 12:14 ` [PULL 03/12] configure: drop unused variables for xts Paolo Bonzini
2021-06-23 12:14 ` [PULL 04/12] meson: remove preadv from summary Paolo Bonzini
2021-06-23 12:14 ` [PULL 05/12] tests: remove QCRYPTO_HAVE_TLS_TEST_SUPPORT Paolo Bonzini
2021-06-23 12:14 ` [PULL 06/12] configure, meson: convert crypto detection to meson Paolo Bonzini
2021-06-23 12:14 ` [PULL 07/12] configure, meson: convert libtasn1 " Paolo Bonzini
2021-06-23 12:14 ` [PULL 08/12] configure, meson: convert pam " Paolo Bonzini
2021-06-23 12:14 ` [PULL 09/12] configure, meson: convert libusb " Paolo Bonzini
2021-06-25  2:09   ` 罗勇刚(Yonggang Luo)
2021-06-25  8:50     ` Paolo Bonzini [this message]
2021-06-23 12:14 ` [PULL 10/12] configure, meson: convert libcacard " Paolo Bonzini
2021-06-23 12:14 ` [PULL 11/12] configure, meson: convert libusbredir " Paolo Bonzini
2021-06-23 12:14 ` [PULL 12/12] KVM: Fix dirty ring mmap incorrect size due to renaming accident Paolo Bonzini
2021-06-24 19:09 ` [PULL 00/12] Misc, mostly meson patches for 2021-06-23 Peter Maydell
2021-06-24 21:04   ` Paolo Bonzini
2021-06-25  8:09     ` Peter Maydell
2021-06-25  8:48       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91cd2b0f-8caf-f2b9-8022-3eddfcb96828@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=luoyonggang@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.