DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [v1 1/3] meson: add a meson option to install examples
Date: Tue,  6 Aug 2024 19:12:16 +0530	[thread overview]
Message-ID: <20240806134218.3619913-2-g.singh@nxp.com> (raw)
In-Reply-To: <20240806134218.3619913-1-g.singh@nxp.com>

Adding a meson option "enable_examples_bin_install"
to install the examples binaries in bin.

Default value is false.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 examples/meson.build | 13 ++++++++++++-
 meson_options.txt    |  2 ++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/examples/meson.build b/examples/meson.build
index 8e8968a1fa..0d0df4e36d 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -124,10 +124,21 @@ foreach example: examples
     if allow_experimental_apis
         cflags += '-DALLOW_EXPERIMENTAL_API'
     endif
-    executable('dpdk-' + name, sources,
+    if get_option('enable_examples_bin_install')
+      executable('dpdk-' + name, sources,
+            include_directories: includes,
+            link_whole: link_whole_libs,
+            link_args: ldflags,
+            c_args: cflags,
+            dependencies: dep_objs,
+	    install_rpath: join_paths(get_option('prefix'), driver_install_path),
+	    install: true)
+    else
+      executable('dpdk-' + name, sources,
             include_directories: includes,
             link_whole: link_whole_libs,
             link_args: ldflags,
             c_args: cflags,
             dependencies: dep_objs)
+    endif
 endforeach
diff --git a/meson_options.txt b/meson_options.txt
index e49b2fc089..e6f83f3f92 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -24,6 +24,8 @@ option('enable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to build. If unspecified, build all drivers.')
 option('enable_driver_sdk', type: 'boolean', value: false, description:
        'Install headers to build drivers.')
+option('enable_examples_bin_install', type: 'boolean', value: false, description:
+       'Install examples binaries')
 option('enable_kmods', type: 'boolean', value: true, description:
        '[Deprecated - will be removed in future release] build kernel modules')
 option('enable_libs', type: 'string', value: '', description:
-- 
2.25.1


  reply	other threads:[~2024-08-06 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 13:42 [v1 0/3] meson options related changes Gagandeep Singh
2024-08-06 13:42 ` Gagandeep Singh [this message]
2024-08-06 13:58   ` [v1 1/3] meson: add a meson option to install examples Bruce Richardson
2024-08-07  4:09     ` Gagandeep Singh
2024-10-17 15:46       ` Thomas Monjalon
2024-08-06 13:42 ` [v1 2/3] meson: add a meson option to install examples source Gagandeep Singh
2024-08-06 14:01   ` Bruce Richardson
2024-08-07  4:08     ` Gagandeep Singh
2024-10-17 15:50       ` Thomas Monjalon
2024-08-06 13:42 ` [v1 3/3] meson: skip symlinks to PMDs script on no sub directory Gagandeep Singh
2024-08-06 13:57   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240806134218.3619913-2-g.singh@nxp.com \
    --to=g.singh@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).