blob: 6f689022bd7125f46b261ceed01ddcb876ec9aeb [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 Bishopb4459912019-11-05 19:39:11 -050041sdbusplus = dependency('sdbusplus')
42systemd = dependency('systemd')
43systemd_system_unit_dir = systemd.get_pkgconfig_variable(
44 'systemdsystemunitdir',
45 define_variable: ['prefix', get_option('prefix')])
46packagedir = join_paths(
47 get_option('prefix'),
48 get_option('datadir'),
49 meson.project_name(),
50)
51threads = dependency('threads')
Brad Bishopff1ddb72020-01-15 12:24:56 -050052if cpp.has_header('valijson/validator.hpp')
53 valijson = declare_dependency()
54else
55 subproject('valijson', required: false)
56 valijson = declare_dependency(
57 include_directories: 'subprojects/valijson/include'
58 )
59endif
Brad Bishopb4459912019-11-05 19:39:11 -050060
61install_data('blacklist.json')
62
63configs = [
64 '1Ux16 Riser.json',
65 '2Ux8 Riser.json',
66 '8X25 HSBP.json',
67 'A2UL16RISER.json',
68 'A2UX8X4RISER.json',
69 'AHW1UM2RISER.json',
70 'AXX1P100HSSI_AIC.json',
71 'AXX2PRTHDHD.json',
72 'BNP Baseboard.json',
73 'Delta DPS-750XB PSU.json',
74 'F1U12X25 HSBP.json',
75 'F1U4X25 HSBP.json',
76 'F2U12X35 HSBP.json',
77 'F2U8X25 HSBP.json',
78 'FBTP.json',
79 'FBYV2.json',
80 'Flextronics S-1100ADU00-201 PSU.json',
81 'Intel Front Panel.json',
82 'NVME P4000.json',
83 'PCIE SSD Retimer.json',
84 'PSSF132202A.json',
85 'PSSF162205A.json',
86 'PSSF212201A.json',
87 'PSSF222201A.json',
88 'R1000 Chassis.json',
89 'R2000 Chassis.json',
90 'SAS Module.json',
91 'SOLUM_PSSF162202_PSU.json',
92 'STP Baseboard.json',
93 'STP P4000 Chassis.json',
94 'WFT Baseboard.json',
95]
96
97foreach c : configs
98 install_data(
99 join_paths('configurations', c),
100 install_dir: join_paths(
101 packagedir,
102 'configurations',
103 )
104 )
105endforeach
106
107schemas = [
108 'global.json',
109 'Pid.json',
110 'Pid.Zone.json',
111 'Stepwise.json',
112]
113
114foreach s : schemas
115 install_data(
116 join_paths('schemas', s),
117 install_dir: join_paths(
118 packagedir,
119 'configurations',
120 'schemas',
121 )
122 )
123endforeach
124
125subdir('service_files')
126subdir('src')
127subdir('test')