[dpdk-dev] [PATCH v2] build: add definitions for use as meson subproject
Thomas Monjalon
thomas at monjalon.net
Wed Feb 2 21:59:29 CET 2022
05/11/2021 19:11, Bruce Richardson:
> On Fri, Nov 05, 2021 at 10:22:13AM -0700, Stephen Hemminger wrote:
> > +# If DPDK is being built as subproject then define
> > +# variable with the dependency convention
> > +if meson.is_subproject()
> > + libdpdk_dep = declare_dependency(
> > + version: meson.project_version(),
> > + compile_args : pkg_extra_cflags,
> > + dependencies: dpdk_libs_deps,
> > + link_args: dpdk_extra_ldflags,
> > + link_with: dpdk_libraries
>
> Minor nit, but the dpdk_libraries is always the shared libs, it's
> dpdk_static_libraries in the static case. Since elsewhere you switched on
> the "default_library" value, maybe you should do so here.
>
> Personally, I'd tend more towards having two new vars, "dpdk_libs_deps" and
> "dpdk_static_libs_deps", and then define two global dependency objects:
> "libdpdk_dep" and "libdpdk_static_dep", to make it easy for subprojects to
> pull in the one they want.
I don't want to merge this patch without having an answer to this comment.
Stephen, what do you think?
More information about the dev
mailing list