blob: 3a61d9b6bf81e16a219f2ddfe1217dbacdb74c07 [file] [log] [blame]
Brad Bishopb4459912019-11-05 19:39:11 -05001project(
2 'entity-manager',
3 'cpp',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
7 'cpp_std=c++17'
8 ],
9 license: 'Apache-2.0',
10 version: '0.1',
11)
12
13boost_args = [
14 '-DBOOST_SYSTEM_NO_DEPRECATED',
15 '-DBOOST_ERROR_CODE_HEADER_ONLY',
16 '-DBOOST_NO_RTTI',
17 '-DBOOST_NO_TYPEID',
18 '-DBOOST_ALL_NO_LIB',
19]
20build_tests = get_option('tests')
Brad Bishope3a12b62020-01-15 11:56:29 -050021cpp = meson.get_compiler('cpp')
Brad Bishop787e8282020-01-15 12:16:53 -050022boost = dependency('boost', required: false)
23if not boost.found()
24 subproject('boost', required: false)
25 boost = declare_dependency(
26 include_directories: 'subprojects/boost_1_71_0',
27 )
28endif
Brad Bishop92daaaa2020-01-20 15:45:01 -050029if get_option('fru-device')
30 i2c = cpp.find_library('i2c')
31endif
Brad Bishop79a09a82020-01-15 12:23:07 -050032if cpp.has_header('nlohmann/json.hpp')
33 nlohmann_json = declare_dependency()
34else
35 subproject('nlohmann', required: false)
36 nlohmann_json = declare_dependency(
37 include_directories: [
38 'subprojects/nlohmann/single_include',
39 'subprojects/nlohmann/single_include/nlohmann',
40 ]
41 )
42endif
Brad Bishop6765d902020-01-15 12:31:41 -050043sdbusplus = dependency('sdbusplus', required: false)
44if not sdbusplus.found()
Patrick Williams7f5a3362020-06-01 09:30:47 -050045 sdbusplus_proj = subproject('sdbusplus', required: true)
46 sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
Brad Bishop6765d902020-01-15 12:31:41 -050047endif
Brad Bishopb4459912019-11-05 19:39:11 -050048systemd = dependency('systemd')
49systemd_system_unit_dir = systemd.get_pkgconfig_variable(
50 'systemdsystemunitdir',
51 define_variable: ['prefix', get_option('prefix')])
52packagedir = join_paths(
53 get_option('prefix'),
54 get_option('datadir'),
55 meson.project_name(),
56)
57threads = dependency('threads')
Brad Bishopff1ddb72020-01-15 12:24:56 -050058if cpp.has_header('valijson/validator.hpp')
59 valijson = declare_dependency()
60else
61 subproject('valijson', required: false)
62 valijson = declare_dependency(
63 include_directories: 'subprojects/valijson/include'
64 )
65endif
Brad Bishopb4459912019-11-05 19:39:11 -050066
67install_data('blacklist.json')
68
69configs = [
70 '1Ux16 Riser.json',
71 '2Ux8 Riser.json',
72 '8X25 HSBP.json',
73 'A2UL16RISER.json',
74 'A2UX8X4RISER.json',
75 'AHW1UM2RISER.json',
Andrei Kartashevb32e00d2020-09-11 22:40:38 +030076 'ASPOWER_U1A-D10550_PSU.json',
77 'ASPOWER_U1A-D10800_PSU.json',
78 'ASPOWER_U1A-D11200_PSU.json',
79 'ASPOWER_U1A-D11600_PSU.json',
80 'ASPOWER_U1D-D10800_PSU.json',
Brad Bishopb4459912019-11-05 19:39:11 -050081 'AXX1P100HSSI_AIC.json',
82 'AXX2PRTHDHD.json',
83 'BNP Baseboard.json',
84 'Delta DPS-750XB PSU.json',
Andrei Kartashevb32e00d2020-09-11 22:40:38 +030085 'Delta_DPS-1600AB_PSU.json',
86 'Delta_DPS-2000AB_PSU.json',
Brad Bishopb4459912019-11-05 19:39:11 -050087 'F1U12X25 HSBP.json',
88 'F1U4X25 HSBP.json',
89 'F2U12X35 HSBP.json',
90 'F2U8X25 HSBP.json',
91 'FBTP.json',
92 'FBYV2.json',
93 'Flextronics S-1100ADU00-201 PSU.json',
94 'Intel Front Panel.json',
Brad Bishop55237c42020-10-01 10:08:42 -040095 'Nisqually.json',
Brad Bishopb4459912019-11-05 19:39:11 -050096 'NVME P4000.json',
97 'PCIE SSD Retimer.json',
98 'PSSF132202A.json',
99 'PSSF162205A.json',
100 'PSSF212201A.json',
101 'PSSF222201A.json',
102 'R1000 Chassis.json',
103 'R2000 Chassis.json',
104 'SAS Module.json',
105 'SOLUM_PSSF162202_PSU.json',
106 'STP Baseboard.json',
107 'STP P4000 Chassis.json',
108 'WFT Baseboard.json',
109]
110
111foreach c : configs
112 install_data(
113 join_paths('configurations', c),
114 install_dir: join_paths(
115 packagedir,
116 'configurations',
117 )
118 )
119endforeach
120
121schemas = [
122 'global.json',
Brad Bishop66665882020-05-07 17:05:18 -0400123 'legacy.json',
Brad Bishopb9809912020-05-07 17:15:31 -0400124 'openbmc-dbus.json',
Brad Bishop4afe7082020-10-01 09:59:26 -0400125 'IBM.json',
Brad Bishopb4459912019-11-05 19:39:11 -0500126 'Pid.json',
127 'Pid.Zone.json',
128 'Stepwise.json',
129]
130
131foreach s : schemas
132 install_data(
133 join_paths('schemas', s),
134 install_dir: join_paths(
135 packagedir,
136 'configurations',
137 'schemas',
138 )
139 )
140endforeach
141
142subdir('service_files')
143subdir('src')
Jason M. Billsff58eba2020-04-14 16:05:30 -0700144if not build_tests.disabled()
145 subdir('test')
146endif