Update meson for upstream support
Move IBM specific requirements under condition as it is not
required for generic upstream CI.
Change-Id: I23f670ced6d87c71ca3a4786b53b2d05c6b16f8b
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/meson.build b/meson.build
index faba720..238a82c 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@
subdir('test')
endif
-subdir('vpd-tool')
-
compiler = meson.get_compiler('cpp')
conf_data = configuration_data()
@@ -50,38 +48,42 @@
configure_file(output: 'config.h',
configuration : conf_data)
-libvpdecc_src = files(
- 'vpdecc/vpdecc.c',
- 'vpdecc/vpdecc_support.c'
-)
+services = ['service_files/vpd-manager.service']
-libvpdecc = shared_library(
- 'vpdecc',
- libvpdecc_src,
- version: meson.project_version(),
- install: true,
-)
+if get_option('ibm_system').allowed()
+ subdir('vpd-tool')
+ scripts = ['scripts/wait-vpd-status.sh']
+
+ install_data(scripts,
+ install_mode: 'rwxr-xr-x',
+ install_dir: get_option('bindir'))
+
+ services += ['service_files/system-vpd.service',
+ 'service_files/wait-vpd-parsers.service']
+
+ package_datadir = join_paths('share', 'vpd')
+ install_subdir('configuration/ibm/', install_mode: 'rwxr-xr-x', install_dir: package_datadir, strip_directory: true)
+endif
libgpiodcxx = dependency(
'libgpiodcxx',
default_options: ['bindings=cxx'],
)
+libvpdecc_src = files(
+ 'vpdecc/vpdecc.c',
+ 'vpdecc/vpdecc_support.c'
+ )
+
+ libvpdecc = shared_library(
+ 'vpdecc',
+ libvpdecc_src,
+ version: meson.project_version(),
+ install: true,
+ )
+
subdir('vpd-manager')
-services = ['service_files/vpd-manager.service',
- 'service_files/system-vpd.service',
- 'service_files/wait-vpd-parsers.service']
-
systemd_system_unit_dir = dependency('systemd').get_variable(
'systemdsystemunitdir')
install_data(services, install_dir: systemd_system_unit_dir)
-
-scripts = ['scripts/wait-vpd-status.sh']
-
-install_data(scripts,
- install_mode: 'rwxr-xr-x',
- install_dir: get_option('bindir'))
-
-package_datadir = join_paths('share', 'vpd')
-install_subdir('configuration/ibm/', install_mode: 'rwxr-xr-x', install_dir: package_datadir, strip_directory: true)