blob: 32ba249442e520827695c2867be60a082dee66b7 [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)
Brad Bishopec984912020-10-01 10:24:55 -040012add_project_arguments('-Wno-psabi', language: 'cpp')
Brad Bishopb4459912019-11-05 19:39:11 -050013
14boost_args = [
15 '-DBOOST_SYSTEM_NO_DEPRECATED',
16 '-DBOOST_ERROR_CODE_HEADER_ONLY',
17 '-DBOOST_NO_RTTI',
18 '-DBOOST_NO_TYPEID',
19 '-DBOOST_ALL_NO_LIB',
20]
21build_tests = get_option('tests')
Brad Bishope3a12b62020-01-15 11:56:29 -050022cpp = meson.get_compiler('cpp')
Brad Bishop787e8282020-01-15 12:16:53 -050023boost = dependency('boost', required: false)
24if not boost.found()
25 subproject('boost', required: false)
26 boost = declare_dependency(
27 include_directories: 'subprojects/boost_1_71_0',
28 )
29endif
Brad Bishop92daaaa2020-01-20 15:45:01 -050030if get_option('fru-device')
31 i2c = cpp.find_library('i2c')
32endif
Brad Bishop79a09a82020-01-15 12:23:07 -050033if cpp.has_header('nlohmann/json.hpp')
34 nlohmann_json = declare_dependency()
35else
36 subproject('nlohmann', required: false)
37 nlohmann_json = declare_dependency(
38 include_directories: [
39 'subprojects/nlohmann/single_include',
40 'subprojects/nlohmann/single_include/nlohmann',
41 ]
42 )
43endif
Brad Bishop6765d902020-01-15 12:31:41 -050044sdbusplus = dependency('sdbusplus', required: false)
45if not sdbusplus.found()
Patrick Williams7f5a3362020-06-01 09:30:47 -050046 sdbusplus_proj = subproject('sdbusplus', required: true)
47 sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
Brad Bishop6765d902020-01-15 12:31:41 -050048endif
Brad Bishopb4459912019-11-05 19:39:11 -050049systemd = dependency('systemd')
50systemd_system_unit_dir = systemd.get_pkgconfig_variable(
51 'systemdsystemunitdir',
52 define_variable: ['prefix', get_option('prefix')])
53packagedir = join_paths(
54 get_option('prefix'),
55 get_option('datadir'),
56 meson.project_name(),
57)
58threads = dependency('threads')
Brad Bishopff1ddb72020-01-15 12:24:56 -050059if cpp.has_header('valijson/validator.hpp')
60 valijson = declare_dependency()
61else
62 subproject('valijson', required: false)
63 valijson = declare_dependency(
64 include_directories: 'subprojects/valijson/include'
65 )
66endif
Brad Bishopb4459912019-11-05 19:39:11 -050067
68install_data('blacklist.json')
69
70configs = [
71 '1Ux16 Riser.json',
72 '2Ux8 Riser.json',
73 '8X25 HSBP.json',
74 'A2UL16RISER.json',
75 'A2UX8X4RISER.json',
76 'AHW1UM2RISER.json',
Andrei Kartashevb32e00d2020-09-11 22:40:38 +030077 'ASPOWER_U1A-D10550_PSU.json',
78 'ASPOWER_U1A-D10800_PSU.json',
79 'ASPOWER_U1A-D11200_PSU.json',
80 'ASPOWER_U1A-D11600_PSU.json',
81 'ASPOWER_U1D-D10800_PSU.json',
Brad Bishopb4459912019-11-05 19:39:11 -050082 'AXX1P100HSSI_AIC.json',
83 'AXX2PRTHDHD.json',
84 'BNP Baseboard.json',
85 'Delta DPS-750XB PSU.json',
Andrei Kartashevb32e00d2020-09-11 22:40:38 +030086 'Delta_DPS-1600AB_PSU.json',
87 'Delta_DPS-2000AB_PSU.json',
Brad Bishopb4459912019-11-05 19:39:11 -050088 'F1U12X25 HSBP.json',
89 'F1U4X25 HSBP.json',
90 'F2U12X35 HSBP.json',
91 'F2U8X25 HSBP.json',
92 'FBTP.json',
93 'FBYV2.json',
94 'Flextronics S-1100ADU00-201 PSU.json',
95 'Intel Front Panel.json',
Brad Bishop55237c42020-10-01 10:08:42 -040096 'Nisqually.json',
Brad Bishopb4459912019-11-05 19:39:11 -050097 'NVME P4000.json',
98 'PCIE SSD Retimer.json',
99 'PSSF132202A.json',
100 'PSSF162205A.json',
101 'PSSF212201A.json',
102 'PSSF222201A.json',
103 'R1000 Chassis.json',
104 'R2000 Chassis.json',
105 'SAS Module.json',
106 'SOLUM_PSSF162202_PSU.json',
107 'STP Baseboard.json',
108 'STP P4000 Chassis.json',
109 'WFT Baseboard.json',
110]
111
112foreach c : configs
113 install_data(
114 join_paths('configurations', c),
115 install_dir: join_paths(
116 packagedir,
117 'configurations',
118 )
119 )
120endforeach
121
122schemas = [
123 'global.json',
Brad Bishop66665882020-05-07 17:05:18 -0400124 'legacy.json',
Brad Bishopb9809912020-05-07 17:15:31 -0400125 'openbmc-dbus.json',
Brad Bishop4afe7082020-10-01 09:59:26 -0400126 'IBM.json',
Brad Bishopb4459912019-11-05 19:39:11 -0500127 'Pid.json',
128 'Pid.Zone.json',
129 'Stepwise.json',
130]
131
132foreach s : schemas
133 install_data(
134 join_paths('schemas', s),
135 install_dir: join_paths(
136 packagedir,
137 'configurations',
138 'schemas',
139 )
140 )
141endforeach
142
143subdir('service_files')
144subdir('src')
Jason M. Billsff58eba2020-04-14 16:05:30 -0700145if not build_tests.disabled()
146 subdir('test')
147endif