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