[PATCH v2] build: add definitions for use as meson subproject
Bruce Richardson
bruce.richardson at intel.com
Fri May 6 16:06:07 CEST 2022
On Fri, Nov 05, 2021 at 10:22:13AM -0700, Stephen Hemminger wrote:
> 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 dependency to follow the
> "Naming convention for dependency variables" from the documentation.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>
> v2 - add link libraries
>
Playing around with DPDK as a meson subproject myself, I have some
additional thoughts on how to put this in DPDK and some further comments on
this patch. For example:
* For static builds we need to "link_whole" the drivers, as well as doing a
"link_with" on the libraries
* for shared builds - which will need to be done explicitly by passing the
subproject the default_library type parameter we actually don't need to
include the "link_with" line since the libs are already included in the
shared deps. [I think they should be added to the static deps too, if
that doesn't cause any problems]
* we therefore likely need slightly different subproject definitions for
shared vs static, and I'd suggest moving that to a new file e.g. in
"buildtools/subproject" - to avoid cluttering the main file too much.
If you don't mind, I'll do a re-spin of this functionality in a
V3 patch, based on above ideas, and we can see where we go there.
/Bruce
More information about the dev
mailing list