blob: 8bb3675208895767b1f535ae41cc1f69792d3898 [file] [log] [blame]
Jason M. Bills5e1e7e32023-08-03 13:42:18 -07001project(
2 'host-error-monitor',
3 'cpp',
4 version : '1.0',
5 meson_version: '>=1.1.1',
6 default_options: [
7 'b_ndebug=if-release',
8 'cpp_rtti=false',
9 'cpp_std=c++20',
10 'warning_level=3',
11 'werror=true',
12 ]
13)
14
15if(get_option('libpeci').enabled())
16 add_project_arguments('-DLIBPECI', language : 'cpp')
17endif
18
19if(get_option('crashdump').enabled())
20 add_project_arguments('-DCRASHDUMP', language : 'cpp')
21endif
22
23sdbusplus = dependency('sdbusplus')
24gpiodcxx = dependency('libgpiodcxx',
25 default_options: ['bindings=cxx'],
26)
27
28systemd = dependency('systemd', required: true)
29systemd_system_unit_dir = systemd.get_variable(pkgconfig:
30 'systemdsystemunitdir'
31)
32
Jason M. Bills1b7e5602023-10-03 14:42:23 -070033boost = dependency('boost', version : '>=1.82.0', required : false, include_type: 'system')
34if not boost.found()
35 boost = subproject('boost', required: true).get_variable('boost_dep')
36 boost = boost.as_system('system')
37endif
Jason M. Bills5e1e7e32023-08-03 13:42:18 -070038add_project_arguments(
39 [
40 '-DBOOST_ASIO_DISABLE_THREADS',
41 '-DBOOST_ASIO_EXCEPTION_DISABLE',
42 '-DBOOST_ASIO_NO_DEPRECATED',
43 '-DBOOST_NO_RTTI',
44 '-DBOOST_NO_TYPEID',
45 ],
46 language : 'cpp'
47)
48
49bindir = get_option('prefix') + '/' + get_option('bindir')
50
51deps = [
52 boost,
53 gpiodcxx,
54 sdbusplus,
55]
56
57if(get_option('libpeci').enabled())
58 peci = dependency('libpeci')
59 deps += [
60 peci,
61 ]
62endif
63
64executable(
65 'host-error-monitor',
66 'src/host_error_monitor.cpp',
67 include_directories: include_directories('include'),
68 dependencies: deps,
69 install: true,
70 install_dir: bindir
71)
72
73subdir('service_files')