DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] build: allow build DPDK as a meson submodule
@ 2021-11-03 22:12 Stephen Hemminger
  2021-11-04  8:59 ` Bruce Richardson
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stephen Hemminger @ 2021-11-03 22:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Stephen Hemminger

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 <stephen@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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2] build: add definitions for use as meson subproject
@ 2022-04-18 14:48 Ben Magistro
  0 siblings, 0 replies; 13+ messages in thread
From: Ben Magistro @ 2022-04-18 14:48 UTC (permalink / raw)
  To: bruce.richardson, stephen, dev

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

I am currently in the process of trying to embed DPDK into a project
utilizing meson's subproject so have some interest in this patch now.  To
Bruce's question, I believe default_library parameter that would be passed
when including the subproject would correctly handle flipping between
static and shared for the dependency.

Still learning/figuring out meson (and hoping this gets attached to the
patch discussion).

[-- Attachment #2: Type: text/html, Size: 474 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-07 16:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 22:12 [dpdk-dev] [RFC] build: allow build DPDK as a meson submodule Stephen Hemminger
2021-11-04  8:59 ` Bruce Richardson
2021-11-05  0:01 ` [dpdk-dev] [PATCH] " Stephen Hemminger
2021-11-05 14:58   ` Bruce Richardson
2021-11-05 16:17     ` Stephen Hemminger
2021-11-05 17:22 ` [dpdk-dev] [PATCH v2] build: add definitions for use as meson subproject Stephen Hemminger
2021-11-05 18:11   ` Bruce Richardson
2022-02-02 20:59     ` Thomas Monjalon
2022-05-06 14:06   ` Bruce Richardson
2022-05-06 14:43 ` [PATCH v3] " Bruce Richardson
2022-05-21  0:54   ` Ben Magistro
2022-06-07 16:05     ` Thomas Monjalon
2022-04-18 14:48 [dpdk-dev] [PATCH v2] " Ben Magistro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).