summaryrefslogtreecommitdiff
path: root/drivers/meson.build
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2019-02-26 17:46:33 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-02-27 12:13:54 +0100
commite30b4e566f47ab1ed6c322878022bc60980fe5c2 (patch)
treedc52618b1c0bb3d7fe9de252444830313958d3fc /drivers/meson.build
parenteded3f928c74a46a336264ad9b6cc46c522a1a75 (diff)
downloaddpdk-next-eventdev-e30b4e566f47ab1ed6c322878022bc60980fe5c2.zip
dpdk-next-eventdev-e30b4e566f47ab1ed6c322878022bc60980fe5c2.tar.gz
dpdk-next-eventdev-e30b4e566f47ab1ed6c322878022bc60980fe5c2.tar.xz
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>
Diffstat (limited to 'drivers/meson.build')
-rw-r--r--drivers/meson.build9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/meson.build b/drivers/meson.build
index e37d4fe..69d0556 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -46,10 +46,11 @@ foreach class:driver_classes
# set up internal deps. Drivers can append/override as necessary
deps = std_deps
# ext_deps: Stores external library dependency got
- # using dependency() or cc.find_library(). For most cases, we
- # probably also need to specify the "-l" flags in
- # pkgconfig_extra_libs variable too, so that it can be reflected
- # in the pkgconfig output for static builds
+ # using dependency() (preferred) or find_library().
+ # For the find_library() case (but not with dependency()) we also
+ # need to specify the "-l" flags in pkgconfig_extra_libs variable
+ # too, so that it can be reflected in the pkgconfig output for
+ # static builds.
ext_deps = []
pkgconfig_extra_libs = []