blob: b0ea0684ad2273e52da2b0084066679cf341c861 [file] [log] [blame]
Brad Bishop39b370a2019-09-02 02:37:32 -04001project(
2 'witherspoon-pfault-analysis',
3 'cpp',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
Patrick Williamsb1dc2b22023-07-12 11:15:31 -05007 'cpp_std=c++23'
Brad Bishop39b370a2019-09-02 02:37:32 -04008 ],
9 license: 'Apache-2.0',
10 version: '1.0',
Patrick Williamsb1dc2b22023-07-12 11:15:31 -050011 meson_version: '>=1.1.1',
Brad Bishop39b370a2019-09-02 02:37:32 -040012)
13
14build_tests = get_option('tests')
15
Brad Bishop39b370a2019-09-02 02:37:32 -040016gmock = dependency('gmock', disabler: true, required: build_tests)
17gtest = dependency('gtest', main: true, disabler: true, required: build_tests)
Brad Bishop39b370a2019-09-02 02:37:32 -040018phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
19phosphor_logging = dependency('phosphor-logging')
Patrick Williamsf29a6f12020-05-13 12:06:23 -050020prog_python = import('python').find_installation('python3')
Brad Bishop39b370a2019-09-02 02:37:32 -040021sdbusplus = dependency('sdbusplus')
22sdbuspp = find_program('sdbus++')
23sdeventplus = dependency('sdeventplus')
24
25conf = configuration_data()
26conf.set_quoted(
27 'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root'))
28conf.set_quoted(
29 'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root'))
30conf.set10(
31 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access'))
32
33configure_file(output: 'config.h', configuration: conf)
34
35# Ensure the generated header here winds up in the correct path in the build
36# tree such that it actually get used and doesn't get found in the sysroot
37# somewhere. Meson doesn't allow path elements (rightfully so) when specifying
38# the output filename of a target definition so the target must be defined in
39# the directory where the artifacts need to be placed. Do that now, because
40# the generated source (cpp) is needed to define the library target.
41subdir('org/open_power/Witherspoon/Fault')
42
43libpower = static_library(
44 'power',
45 error_cpp,
46 error_hpp,
47 'gpio.cpp',
48 'pmbus.cpp',
49 'utility.cpp',
50 dependencies: [
Brad Bishop39b370a2019-09-02 02:37:32 -040051 phosphor_dbus_interfaces,
52 phosphor_logging,
53 sdbusplus,
54 sdeventplus,
55 ],
56)
57
58subdir('power-sequencer')
59subdir('power-supply')
60subdir('test')