Some other projects using meson may not be able to use DPDK using the standard distribution pkg-config mechanism. Meson supports a way to handle this via the subproject https://mesonbuild.com/Subprojects.html
This patch adds the necessary depedency to follow the "Naming convention for depedency variables" from the documentation. It has no impact if subproject is not being used. Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meson.build b/meson.build index 12cb6e0e83f3..6ce5eda2779f 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,16 @@ configure_file(output: build_cfg, # build pkg-config files for dpdk subdir('buildtools/pkg-config') +# If DPDK is being built as subproject then define +# varialble with the dependency convention +if meson.is_subproject() + libdpdk_dep = declare_dependency( + version: meson.project_version(), + compile_args : pkg_extra_cflags, + dependencies: shared_deps + ) +endif + # final output, list all the libs and drivers to be built # this does not affect any part of the build, for information only. output_message = '\n=================\nLibraries Enabled\n=================\n' -- 2.30.2