sdbus++: Fix meson dependency generation
All of the generated meson files optionally look for sdbus++ sources
that can be plumbed in to allow changes to the generator code to
correctly trigger rebuilds.
This will require adding a new variable prior to generated sources,
`sdbusplusplus_depfiles`. You can convert previous meson defitions with
the follwing.
```
sdbusplus_dep = dependency('sdbusplus')
sdbusplusplus_prog = find_program('sdbus++', native: true)
sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
sdbusplusplus_depfiles = files()
if sdbusplus_dep.type_name() == 'internal'
sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
endif
```
Change-Id: Ic2d5bafdbdd2595be8c44e0e616e590143639f21
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/example/meson.build b/example/meson.build
index 837c6f7..b338dc1 100644
--- a/example/meson.build
+++ b/example/meson.build
@@ -44,20 +44,10 @@
dependencies: asio_dep,
)
-calc_buildroot = meson.current_build_dir()
-calc_files = files(
- run_command(
- sdbusgen_prog,
- '--tool', sdbusplusplus_prog,
- '--output', calc_buildroot,
- 'net',
- check: true
- ).stdout().strip().split('\n')
-)
-
+subdir('net/poettering/Calculator')
executable(
'calculator-server',
'calculator-server.cpp',
- calc_files,
+ calculator_sources,
dependencies: sdbusplus_dep,
)