blob: 741347bdb95cebbe7624489bfaabb53897f3333b [file] [log] [blame]
Patrick Williamsf254b062023-03-30 15:51:12 -05001project(
2 'ipmbbridge',
3 'cpp',
4 version: '0.1',
Patrick Williamse6b07fa2023-07-12 11:15:47 -05005 meson_version: '>=1.1.1',
Patrick Williamsf254b062023-03-30 15:51:12 -05006 default_options: [
7 'warning_level=3',
8 'werror=true',
Patrick Williamse6b07fa2023-07-12 11:15:47 -05009 'cpp_std=c++23',
Patrick Williamsf254b062023-03-30 15:51:12 -050010 ],
11)
12
13cpp = meson.get_compiler('cpp')
14add_project_arguments(
15 cpp.get_supported_arguments([
16 '-DBOOST_ERROR_CODE_HEADER_ONLY',
17 '-DBOOST_SYSTEM_NO_DEPRECATED',
18 '-DBOOST_ALL_NO_LIB',
19 '-DBOOST_NO_RTTI',
20 '-DBOOST_NO_TYPEID',
21 '-DBOOST_ASIO_DISABLE_THREADS',
22 ]),
23 language: 'cpp',
24)
25
Patrick Williamsf254b062023-03-30 15:51:12 -050026
27boost_dep = dependency(
28 'boost',
29 modules: ['coroutine'],
30 include_type: 'system',
31)
32i2c_dep = cpp.find_library('i2c')
Patrick Williams0afdd8c2023-12-07 14:31:27 -060033nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
Patrick Williamsf254b062023-03-30 15:51:12 -050034phosphor_logging_dep = dependency('phosphor-logging')
35sdbusplus_dep = dependency('sdbusplus')
36systemd_dep = dependency('systemd')
37
38executable(
Jorge Cisneros315002a2023-04-07 11:43:45 -050039 'ipmbbridged',
Patrick Williamsf254b062023-03-30 15:51:12 -050040 'ipmbbridged.cpp',
41 'ipmbutils.cpp',
42 dependencies: [
43 boost_dep,
44 i2c_dep,
45 nlohmann_json_dep,
46 phosphor_logging_dep,
47 sdbusplus_dep,
48 ],
49 install: true,
50)
51
52install_data(
53 'ipmb.service',
Patrick Williams3e9bd932023-04-12 08:01:21 -050054 install_dir: systemd_dep.get_variable('systemdsystemunitdir'),
Patrick Williamsf254b062023-03-30 15:51:12 -050055)
56
57install_data(
58 'ipmb-channels.json',
59 install_dir: get_option('datadir') / 'ipmbbridge',
60)