[dpdk-dev] [PATCH v7 2/5] build: use dependency() instead of find_library()

Bruce Richardson bruce.richardson at intel.com
Wed Feb 13 16:35:28 CET 2019


On Wed, Feb 13, 2019 at 11:54:49AM +0000, Luca Boccassi wrote:
> 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 at debian.org>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
> v2: split libbsd change in a separate commit, remove CC to stable
>     as a meson bump will be required
> v4: update comment in drivers/meson.build to clarify role of
>     pkgconfig_extra_libs
> v5: remove -lz from drivers/compress/zlib
> v7: remove change from pcap pmd, as it's causing issues with
>     cross-compilation due to missing pkg-config file
> 
I reproduced the compilation errors on cross compile with the older version
of this patch. Using this latest version I don't see them any more.

Tested-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list