-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
102 lines (90 loc) · 2.28 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
project(
'google-ipmi-sys',
'cpp',
version: '0.1',
meson_version: '>=1.1.1',
default_options: [
'cpp_std=c++23',
'warning_level=3',
'werror=true',
])
root_inc = include_directories('.')
conf_data = configuration_data()
conf_data.set_quoted('STATIC_BIFURCATION_CONFIG', get_option('static-bifurcation'))
conf_h = configure_file(
output: 'config.h',
configuration: conf_data)
bm_conf_data = configuration_data()
bm_conf_data.set10('BARE_METAL', get_option('bare_metal'))
bm_conf_data.set_quoted('BM_SIGNAL_PATH', get_option('bm-signal-path'))
bm_conf_h = configure_file(
output: 'bm_config.h',
configuration: bm_conf_data)
meson.get_compiler('cpp').has_header_symbol(
'ipmid/api.h',
'ipmid_get_sd_bus_connection')
stdplus = dependency('stdplus')
subdir('bifurcation')
sys_pre = declare_dependency(
include_directories: root_inc,
dependencies: [
dependency('nlohmann_json', include_type: 'system'),
dependency('phosphor-dbus-interfaces'),
dependency('phosphor-logging'),
dependency('sdbusplus'),
stdplus,
bifurcation_dep,
])
sys_lib = static_library(
'sys',
'bios_setting.cpp',
'bm_instance.cpp',
'bmc_mode.cpp',
'cable.cpp',
'cpld.cpp',
'entity_name.cpp',
'eth.cpp',
'flash_size.cpp',
'handler.cpp',
'host_power_off.cpp',
'ipmi.cpp',
'linux_boot_done.cpp',
'machine_name.cpp',
'pcie_i2c.cpp',
'google_accel_oob.cpp',
'pcie_bifurcation.cpp',
'file_system_wrapper.cpp',
'psu.cpp',
'util.cpp',
implicit_include_directories: false,
dependencies: sys_pre)
sys_dep = declare_dependency(
link_with: sys_lib,
dependencies: sys_pre)
if not get_option('tests').disabled()
subdir('test')
endif
shared_module(
'googlesys',
'main.cpp',
implicit_include_directories: false,
dependencies: [
dependency('libipmid'),
sys_dep,
],
install: true,
install_dir: get_option('libdir') / 'ipmid-providers')
systemd_dep = dependency('systemd')
if systemd_dep.found()
install_data(
'gbmc-host-poweroff.target',
'gbmc-psu-hardreset.target',
'gbmc-psu-hardreset-pre.target',
'gbmc-psu-hardreset-time.service',
install_dir: systemd_dep.get_variable('systemdsystemunitdir'))
endif
install_data(
'gbmc-enqueue-powercycle.sh',
install_dir: get_option('bindir'),
install_mode: 'rwxr-xr-x'
)