[v1 1/3] meson: add a meson option to install examples
Gagandeep Singh
g.singh at nxp.com
Tue Aug 6 15:42:16 CEST 2024
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 at 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
More information about the dev
mailing list