blob: cf1ec16ad3029a523e4cecdeb4a4c0baafbc1e47 [file] [log] [blame]
William A. Kennington III362d0872021-05-11 14:00:02 -07001project(
2 'kcsbridge',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=0.57.0',
6 default_options: [
7 'warning_level=3',
8 'cpp_std=c++20',
9 ])
10
11# CLI11 might not have a pkg-config. It is header only so just make
12# sure we can access the needed symbols from the header.
13cli11_dep = dependency('cli11', required: false)
14has_cli11 = meson.get_compiler('cpp').has_header_symbol(
15 'CLI/CLI.hpp',
16 'CLI::App',
17 dependencies: cli11_dep,
18 required: false)
19assert(has_cli11, 'CLI11 is required')
20
21executable(
22 'kcsbridged',
23 'kcsbridged.cpp',
24 implicit_include_directories: false,
25 dependencies: [
26 dependency(
27 'boost',
28 modules: [
29 'coroutine',
30 'context',
31 ],
32 ),
33 cli11_dep,
34 dependency('phosphor-logging'),
35 dependency('sdbusplus'),
36 ],
37 cpp_args: [
38 '-DBOOST_ASIO_DISABLE_THREADS',
39 '-DBOOST_ALL_NO_LIB',
40 '-DBOOST_SYSTEM_NO_DEPRECATED',
41 '-DBOOST_ERROR_CODE_HEADER_ONLY',
42 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
43 ],
44 install: true,
45 install_dir: get_option('bindir'))
46
47systemd = dependency('systemd')
48if systemd.found()
49 install_data(
50 'phosphor-ipmi-kcs@.service',
51 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'))
52endif