build: remove unconditional subproject libnvme in src/meson.build
In BitBake / Yocto build environments, wrap-based automatic subproject
downloading is disabled. Previously, src/meson.build unconditionally
called subproject('libnvme'), triggering 'Automatic wrap-based
subproject downloading is disabled' during nvmed do_configure.
Since libnvme is already provided by BitBake sysroot via recipe
dependencies, pass subproject default_options directly to
dependency('libnvme') fallback rather than calling subproject()
unconditionally.
Tested: Verified local meson configure and compilation in Docker.
Google-Bug-Id: 565393598
Change-Id: Ia5e2e33e75cbb253ec789d871906f6515239ae4e
Signed-off-by: Guangzong Chen <guangzong@google.com>
TAG=agy
CONV=c78fe6ee-6dfd-4bc5-9dea-32f99ad607fe
diff --git a/meson.build b/meson.build
index 6cc1212..d1f239d 100644
--- a/meson.build
+++ b/meson.build
@@ -11,7 +11,7 @@
meson_version: '>=1.1.1',
)
-# Enable io_uring for all daemons with below flags.
+# Enable io_uring for all daemons with below flags.
# '-DBOOST_ASIO_HAS_IO_URING',
# '-DBOOST_ASIO_DISABLE_EPOLL',
# '-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT',
@@ -148,12 +148,12 @@
if get_option('build-type') == 'ci'
phosphor_dbus_interfaces_dep = dependency('pdi')
else
- phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces',
+ phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces',
required : true,
fallback : ['phosphor_dbus_interfaces', 'pdi'],
include_type: 'system'
)
-endif
+endif
nvme_dbus_deps = [
phosphor_dbus_interfaces_dep,
diff --git a/src/meson.build b/src/meson.build
index fe262ba..430158e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -223,20 +223,20 @@
)
pdi_dep = phosphor_dbus_interfaces_dep
- subproject('libnvme', default_options: ['warning_level=1', 'werror=false'])
- libnvme = dependency('libnvme',
+ libnvme = dependency('libnvme',
required : true,
fallback : ['libnvme', 'libnvme_dep'],
+ default_options : ['warning_level=1', 'werror=false'],
include_type: 'system'
)
- libnvme_mi = dependency('libnvme-mi',
+ libnvme_mi = dependency('libnvme-mi',
required : true,
fallback : ['libnvme', 'libnvme_mi_dep'],
include_type: 'system'
)
- nvme_deps = [
- default_deps, i2c, thresholds_dep, utils_dep,
+ nvme_deps = [
+ default_deps, i2c, thresholds_dep, utils_dep,
threads, pdi_dep, libnvme, libnvme_mi,
nvme_dbus_dep, nvme_proto_dep
]
@@ -271,13 +271,13 @@
nvme_plugin_dep = declare_dependency(
include_directories: nvme_plugin_inc,
- dependencies: [default_deps, nvme_dbus_dep, pdi_dep, libnvme_mi],
+ dependencies: [default_deps, nvme_dbus_dep, pdi_dep, libnvme_mi],
)
pkgconfig = import('pkgconfig')
pkgconfig.generate(
- name: 'nvme-plugin',
- version: meson.project_version(),
+ name: 'nvme-plugin',
+ version: meson.project_version(),
description: 'nvmed plugin package',
subdirs: ['.', 'gen', 'nvmed']
)