meson: add option for open-power functions
This repository has long had an open-power only function that ends
up compiled into all systems. We cannot use the phosphor-logging
generated errors, unless we are able to disable this code on
non-open-power systems. Add necessary meson options.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icd5b2f4cdec206597029930790ef2b10170d232a
diff --git a/meson.build b/meson.build
index 4a4d01e..c043d79 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,9 @@
if get_option('shortname-replace-words').enabled()
conf_data.set_quoted('SHORTNAME_REPLACE_WORDS', '1')
endif
+if get_option('open-power').allowed()
+ conf_data.set_quoted('OPEN_POWER_SUPPORT', '1')
+endif
matches_map = get_option('matches-map')
conf_data.set('MAJOR_MATCH_INDEX', matches_map[0])
@@ -217,6 +220,11 @@
storage_cmds_src = ['dbus-sdr/storagecommands.cpp', 'dbus-sdr/sdrutils.cpp']
endif
+openpower_cmds_src = []
+if get_option('open-power').allowed()
+ openpower_cmds_src = [ 'storageaddsel.cpp' ]
+endif
+
libipmi20_src = [
'app/channel.cpp',
'app/watchdog.cpp',
@@ -228,7 +236,6 @@
'chassishandler.cpp',
'dcmihandler.cpp',
'ipmisensor.cpp',
- 'storageaddsel.cpp',
'transporthandler.cpp',
'globalhandler.cpp',
'groupext.cpp',
@@ -240,6 +247,7 @@
generated_src,
transportoem_src,
storage_cmds_src,
+ openpower_cmds_src,
conf_h,
]