Merge of vpd_manager meson script with repo meson
This commit merges meson script of vpd-manager app
into the meson script for openpower-vpd-parser repo.
vpd-manager needs to be build only if we are building
ibm-read-vpd exe.
To enable build of vpd-manager the flag needs to
be enabled.
Test Command:
meson -Dibm-parser=enabled -Dvpd-manager=enabled builddir
ninja -C builddir
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: Ib9c8229e54c37c55654b070adb3df616d105af23
diff --git a/vpd-manager/meson.build b/vpd-manager/meson.build
index da736d7..44b34aa 100644
--- a/vpd-manager/meson.build
+++ b/vpd-manager/meson.build
@@ -1,25 +1,6 @@
-project('vpd-manager',
- 'cpp',
- 'c',
- default_options : ['cpp_std=c++17'],
- version : '1.0')
-sdbusplus = dependency('sdbusplus')
-phosphor_logging = dependency('phosphor-logging')
systemd = dependency('libsystemd', version : '>= 221')
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
-compiler = meson.get_compiler('cpp')
-compiler.has_header('nlohmann/json.hpp')
-
-configure_file( output: 'config.h',
- configuration: {
- 'BUSNAME' : '"' + get_option('BUSNAME') + '"',
- 'OBJPATH' : '"' + get_option('OBJPATH') + '"',
- 'IFACE' : '"' + get_option('IFACE') + '"',
- 'INVENTORY_JSON' : '"' + get_option('INVENTORY_JSON') + '"'
- }
- )
-
configuration_inc = include_directories('.', '../')
vpd_manager_SOURCES =[
@@ -31,16 +12,20 @@
'../impl.cpp',
'../parser.cpp',
'../utils.cpp',
- '../vpdecc/vpdecc.c'
+ '../vpdecc/vpdecc.c',
+ '../vpdecc/vpdecc_support.c'
]
+vpd_manager_dependencies =[sdbusplus,
+ phosphor_logging,
+ systemd,
+ phosphor_dbus_interfaces,
+ ]
+
vpd_manager_exe = executable('vpd-manager',
- vpd_manager_SOURCES,
- include_directories : configuration_inc,
- dependencies :[
- sdbusplus,
- phosphor_logging,
- systemd,
- phosphor_dbus_interfaces,
- ],
- )
+ vpd_manager_SOURCES,
+ include_directories : configuration_inc,
+ dependencies :[vpd_manager_dependencies,
+ ],
+ install: true
+ )