-
Notifications
You must be signed in to change notification settings - Fork 25
/
meson.build
100 lines (90 loc) · 1.89 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
project(
'ipmi-fru-parser',
'cpp',
version: '1.0',
default_options: [
'buildtype=debugoptimized',
'cpp_std=c++23',
'warning_level=3',
'werror=true',
],
meson_version: '>=1.1.1',
)
cxx = meson.get_compiler('cpp')
phosphor_logging_dep = dependency('phosphor-logging')
sdbusplus_dep = dependency('sdbusplus')
ipmid_dep = dependency('libipmid')
if cxx.has_header('CLI/CLI.hpp')
CLI11_dep = declare_dependency()
else
CLI11_dep = dependency('CLI11')
endif
python_prog = find_program('python3', native: true)
fru_gen = custom_target(
'fru-gen.cpp'.underscorify(),
input: [
'scripts/fru_gen.py',
get_option('fru_yaml'),
],
output: 'fru-gen.cpp',
command: [
python_prog, '@INPUT0@',
'-i', '@INPUT1@',
'-o', meson.current_build_dir(),
'generate-cpp',
],
)
properties_gen = custom_target(
'extra-properties-gen.cpp'.underscorify(),
input: [
'scripts/extra-properties.py',
get_option('properties_yaml'),
],
output: 'extra-properties-gen.cpp',
command: [
python_prog, '@INPUT0@',
'-e', '@INPUT1@',
],
)
writefrudata_lib = library(
'writefrudata',
fru_gen,
properties_gen,
'fru_area.cpp',
'frup.cpp',
'writefrudata.cpp',
dependencies: [
sdbusplus_dep,
phosphor_logging_dep,
ipmid_dep,
],
version: meson.project_version(),
install: true,
)
writefrudata_dep = declare_dependency(
link_with: writefrudata_lib,
)
strgfnhandler_lib = library(
'strgfnhandler',
'strgfnhandler.cpp',
dependencies: [
writefrudata_dep,
phosphor_logging_dep,
ipmid_dep,
],
override_options: [ 'b_lundef=false' ],
version: meson.project_version(),
install: true,
install_dir: get_option('libdir') / 'ipmid-providers',
)
executable(
'phosphor-read-eeprom',
'readeeprom.cpp',
dependencies: [
CLI11_dep,
phosphor_logging_dep,
sdbusplus_dep,
writefrudata_dep,
],
install: true,
)