blob: 74086d58f43ca28c2804311679501c160e29faec [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 Bishope3a12b62020-01-15 11:56:29 -050029i2c = cpp.find_library('i2c')
Brad Bishop79a09a82020-01-15 12:23:07 -050030if cpp.has_header('nlohmann/json.hpp')
31 nlohmann_json = declare_dependency()
32else
33 subproject('nlohmann', required: false)
34 nlohmann_json = declare_dependency(
35 include_directories: [
36 'subprojects/nlohmann/single_include',
37 'subprojects/nlohmann/single_include/nlohmann',
38 ]
39 )
40endif
Brad Bishop6765d902020-01-15 12:31:41 -050041sdbusplus = dependency('sdbusplus', required: false)
42if not sdbusplus.found()
43 subproject('sdbusplus', required: false)
44 run_command(find_program('build-sdbusplus.sh'), check: true)
45 sdbusplus = declare_dependency(
46 dependencies: dependency('libsystemd'),
47 include_directories: 'sdbusplus',
48 link_args: [
49 'sdbusplus/.libs/libsdbusplus.so',
50 '-Wl,-rpath,$ORIGIN/../sdbusplus/.libs'
51 ],
52 )
53endif
Brad Bishopb4459912019-11-05 19:39:11 -050054systemd = dependency('systemd')
55systemd_system_unit_dir = systemd.get_pkgconfig_variable(
56 'systemdsystemunitdir',
57 define_variable: ['prefix', get_option('prefix')])
58packagedir = join_paths(
59 get_option('prefix'),
60 get_option('datadir'),
61 meson.project_name(),
62)
63threads = dependency('threads')
Brad Bishopff1ddb72020-01-15 12:24:56 -050064if cpp.has_header('valijson/validator.hpp')
65 valijson = declare_dependency()
66else
67 subproject('valijson', required: false)
68 valijson = declare_dependency(
69 include_directories: 'subprojects/valijson/include'
70 )
71endif
Brad Bishopb4459912019-11-05 19:39:11 -050072
73install_data('blacklist.json')
74
75configs = [
76 '1Ux16 Riser.json',
77 '2Ux8 Riser.json',
78 '8X25 HSBP.json',
79 'A2UL16RISER.json',
80 'A2UX8X4RISER.json',
81 'AHW1UM2RISER.json',
82 'AXX1P100HSSI_AIC.json',
83 'AXX2PRTHDHD.json',
84 'BNP Baseboard.json',
85 'Delta DPS-750XB PSU.json',
86 'F1U12X25 HSBP.json',
87 'F1U4X25 HSBP.json',
88 'F2U12X35 HSBP.json',
89 'F2U8X25 HSBP.json',
90 'FBTP.json',
91 'FBYV2.json',
92 'Flextronics S-1100ADU00-201 PSU.json',
93 'Intel Front Panel.json',
94 'NVME P4000.json',
95 'PCIE SSD Retimer.json',
96 'PSSF132202A.json',
97 'PSSF162205A.json',
98 'PSSF212201A.json',
99 'PSSF222201A.json',
100 'R1000 Chassis.json',
101 'R2000 Chassis.json',
102 'SAS Module.json',
103 'SOLUM_PSSF162202_PSU.json',
104 'STP Baseboard.json',
105 'STP P4000 Chassis.json',
106 'WFT Baseboard.json',
107]
108
109foreach c : configs
110 install_data(
111 join_paths('configurations', c),
112 install_dir: join_paths(
113 packagedir,
114 'configurations',
115 )
116 )
117endforeach
118
119schemas = [
120 'global.json',
121 'Pid.json',
122 'Pid.Zone.json',
123 'Stepwise.json',
124]
125
126foreach s : schemas
127 install_data(
128 join_paths('schemas', s),
129 install_dir: join_paths(
130 packagedir,
131 'configurations',
132 'schemas',
133 )
134 )
135endforeach
136
137subdir('service_files')
138subdir('src')
139subdir('test')