build: improve dependency handling
authorLuca Boccassi <bluca@debian.org>
Tue, 26 Feb 2019 17:46:33 +0000 (17:46 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 27 Feb 2019 11:13:54 +0000 (12:13 +0100)
commite30b4e566f47ab1ed6c322878022bc60980fe5c2
treedc52618b1c0bb3d7fe9de252444830313958d3fc
parenteded3f928c74a46a336264ad9b6cc46c522a1a75
build: improve dependency handling

Whenever possible (if the library ships a pkg-config file) use meson's
dependency() function to look for it, as it will automatically add it
to the Requires.private list if needed, to allow for static builds to
succeed for reverse dependencies of DPDK. Otherwise the recursive
dependencies are not parsed, and users doing static builds have to
resolve them manually by themselves.
When using this API avoid additional checks that are superfluous and
take extra time, and avoid adding the linker flag manually which causes
it to be duplicated.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/compress/zlib/meson.build
drivers/crypto/ccp/meson.build
drivers/crypto/openssl/meson.build
drivers/crypto/qat/meson.build
drivers/meson.build
drivers/net/bnx2x/meson.build
drivers/net/mlx4/meson.build
drivers/net/mlx5/meson.build
lib/librte_bpf/meson.build
lib/librte_telemetry/meson.build