-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmeson.build
103 lines (89 loc) · 2.32 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
103
project(
'phosphor-host-postd',
'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')
postd_headers = include_directories('.')
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
sdbusplus = dependency('sdbusplus')
sdeventplus = dependency('sdeventplus')
systemd = dependency('systemd')
libgpiodcxx = dependency('libgpiodcxx')
conf_data = configuration_data()
conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
conf_data.set('SYSTEMD_TARGET', get_option('systemd-target'))
snoopd_src = ['main.cpp']
snoopd_args = ''
if get_option('snoop').allowed()
snoopd_src += 'ipmisnoop/ipmisnoop.cpp'
add_project_arguments('-DENABLE_IPMI_SNOOP',language:'cpp')
snoopd_args += ' -h "' + get_option('host-instances') + '"'
elif get_option('snoop-device') != ''
snoopd_args += '-b ' + get_option('post-code-bytes').to_string()
snoopd_args += ' -d /dev/' + get_option('snoop-device')
rate_limit = get_option('rate-limit')
if rate_limit > 0
snoopd_args += ' --rate-limit=' + rate_limit.to_string()
endif
endif
conf_data.set('SNOOPD_ARGS', snoopd_args)
configure_file(
input: 'lpcsnoop.service.in',
output: 'lpcsnoop.service',
configuration: conf_data,
install: true,
install_dir: systemd.get_variable('systemdsystemunitdir'))
executable(
'snoopd',
snoopd_src,
dependencies: [
sdbusplus,
sdeventplus,
phosphor_dbus_interfaces,
libgpiodcxx,
],
install: true,
)
executable(
'snooper',
'example.cpp',
dependencies: [
sdbusplus,
sdeventplus,
phosphor_dbus_interfaces,
],
install: true,
)
if not get_option('7seg').disabled()
udevdir = dependency('udev', required : false).get_variable('udevdir')
assert(udevdir != '', 'Cannot find udevdir')
install_data(['80-7seg.rules'], install_dir : udevdir)
install_data(
['[email protected]'],
install_dir: systemd.get_variable('systemdsystemunitdir')
)
executable(
'postcode_7seg',
'7seg.cpp',
dependencies: [
sdbusplus,
phosphor_dbus_interfaces,
],
install: true,
)
endif
install_headers(
'lpcsnoop/snoop.hpp',
'lpcsnoop/snoop_listen.hpp',
subdir: 'lpcsnoop')
if not build_tests.disabled()
subdir('test')
endif