xref: /openbmc/sdbusplus/example/meson.build (revision e1c73d3b)
1executable(
2    'list-users',
3    'list-users.cpp',
4    dependencies: sdbusplus_dep,
5)
6
7assert(
8    not get_option('examples').enabled() or boost_dep.found(),
9    'Boost is required when examples are enabled'
10)
11
12executable(
13    'asio-example',
14    'asio-example.cpp',
15    cpp_args: [
16        '-DBOOST_ASIO_DISABLE_THREADS',
17        '-DBOOST_ALL_NO_LIB',
18        '-DBOOST_SYSTEM_NO_DEPRECATED',
19        '-DBOOST_ERROR_CODE_HEADER_ONLY',
20        '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
21    ],
22    dependencies: [ boost_dep, sdbusplus_dep ],
23)
24
25calc_buildroot = meson.current_build_dir()
26calc_files = files(
27    run_command(
28        sdbusgen_prog,
29        '--tool', sdbusplusplus_prog,
30        '--output', calc_buildroot,
31        'net',
32        check: true
33    ).stdout().strip().split('\n')
34)
35
36executable(
37    'calculator-server',
38    'calculator-server.cpp',
39    calc_files,
40    dependencies: sdbusplus_dep,
41)
42