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