xref: /openbmc/sdbusplus/example/meson.build (revision 43fcd1ce)
1executable(
2    'list-users',
3    'list-users.cpp',
4    dependencies: sdbusplus_dep,
5)
6
7has_asio = meson.get_compiler('cpp').has_header_symbol(
8  'boost/asio.hpp',
9  'boost::asio::io_context',
10  required: false)
11asio_dep = sdbusplus_dep
12if not has_asio
13  asio_dep = disabler()
14endif
15
16assert(
17    not get_option('examples').enabled() or has_asio,
18    'Boost is required when examples are enabled'
19)
20
21executable(
22    'asio-example',
23    'asio-example.cpp',
24    dependencies: [
25        asio_dep,
26        dependency(
27            'boost',
28            modules: ['coroutine', 'context'],
29            disabler: true,
30            required: false,
31        ),
32    ],
33)
34
35executable(
36    'coroutine-example',
37    'coroutine-example.cpp',
38    dependencies: [ sdbusplus_dep ],
39)
40
41executable(
42    'register-property',
43    'register-property.cpp',
44    dependencies: asio_dep,
45)
46
47executable(
48    'get-all-properties',
49    'get-all-properties.cpp',
50    dependencies: asio_dep,
51)
52
53generated_sources = []
54generated_others = []
55subdir('gen')
56subdir('gen/net')
57
58executable(
59    'calculator-server',
60    'calculator-server.cpp',
61    generated_sources,
62    implicit_include_directories: false,
63    include_directories: include_directories('gen'),
64    dependencies: sdbusplus_dep,
65)
66
67executable(
68    'calculator-aserver',
69    'calculator-aserver.cpp',
70    generated_sources,
71    implicit_include_directories: false,
72    include_directories: include_directories('gen'),
73    dependencies: sdbusplus_dep,
74)
75
76executable(
77    'calculator-client',
78    'calculator-client.cpp',
79    generated_sources,
80    implicit_include_directories: false,
81    include_directories: include_directories('gen'),
82    dependencies: sdbusplus_dep,
83)
84