examples: skip build when missing dependencies
authorDavid Marchand <david.marchand@redhat.com>
Sat, 6 Nov 2021 08:53:04 +0000 (09:53 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 10 Nov 2021 10:42:34 +0000 (11:42 +0100)
commitf01ca13fca6dde68fa3962269c5cddb7e8e7f1d7
treed7bff003f668d95993792ea7f64984f857561770
parent609796bad0bd6dfaee05acfcd90bc1ff732add58
examples: skip build when missing dependencies

Trying to disable the vhost library, meson will complain it can't build
the vhost* and vdpa examples when passing -Dexamples=all.

-Dexamples=all skips examples if the example itself announces it can't
be built (for external dependencies, internal dependencies and other
reasons).
Since examples/meson.build will evaluate the internal dependencies
in any case, let's move the check there and resolve the issue for
optional internal libraries.

Fixes: 0bf583222297 ("lib: allow disabling optional libraries")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/distributor/meson.build
examples/kni/meson.build
examples/l3fwd-power/meson.build
examples/meson.build
examples/vhost_crypto/meson.build
examples/vm_power_manager/guest_cli/meson.build
examples/vm_power_manager/meson.build