blob: 837c6f791856ba37562bf19476f389a36c5b0a6f [file] [log] [blame]
Patrick Williamsad145e02020-05-19 16:45:15 -05001executable(
2 'list-users',
3 'list-users.cpp',
Patrick Williamsd0285b92020-06-01 09:43:47 -05004 dependencies: sdbusplus_dep,
Patrick Williamsad145e02020-05-19 16:45:15 -05005)
6
William A. Kennington III270f2422021-06-04 16:07:43 -07007has_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
William A. Kennington III5e893b92020-06-04 02:47:29 -070016assert(
William A. Kennington III270f2422021-06-04 16:07:43 -070017 not get_option('examples').enabled() or has_asio,
William A. Kennington III5e893b92020-06-04 02:47:29 -070018 'Boost is required when examples are enabled'
19)
20
William A. Kennington III7d8dfc42020-06-04 02:45:26 -070021executable(
22 'asio-example',
23 'asio-example.cpp',
William A. Kennington III270f2422021-06-04 16:07:43 -070024 dependencies: [
25 asio_dep,
26 dependency(
27 'boost',
28 modules: ['coroutine', 'context'],
29 disabler: true,
30 required: false,
31 ),
William A. Kennington III7d8dfc42020-06-04 02:45:26 -070032 ],
William A. Kennington III7d8dfc42020-06-04 02:45:26 -070033)
Patrick Williamsad145e02020-05-19 16:45:15 -050034
Krzysztof Grobelny2be0e172020-07-27 11:12:07 +020035executable(
36 'register-property',
37 'register-property.cpp',
William A. Kennington III270f2422021-06-04 16:07:43 -070038 dependencies: asio_dep,
Krzysztof Grobelny2be0e172020-07-27 11:12:07 +020039)
40
Krzysztof Grobelny09b88f22020-09-02 14:49:01 +020041executable(
42 'get-all-properties',
43 'get-all-properties.cpp',
William A. Kennington III270f2422021-06-04 16:07:43 -070044 dependencies: asio_dep,
Krzysztof Grobelny09b88f22020-09-02 14:49:01 +020045)
46
Patrick Williamsad145e02020-05-19 16:45:15 -050047calc_buildroot = meson.current_build_dir()
48calc_files = files(
49 run_command(
50 sdbusgen_prog,
51 '--tool', sdbusplusplus_prog,
52 '--output', calc_buildroot,
53 'net',
54 check: true
55 ).stdout().strip().split('\n')
56)
57
58executable(
59 'calculator-server',
60 'calculator-server.cpp',
61 calc_files,
Patrick Williamsd0285b92020-06-01 09:43:47 -050062 dependencies: sdbusplus_dep,
Patrick Williamsad145e02020-05-19 16:45:15 -050063)