diff options
Diffstat (limited to 'spa/examples/meson.build')
-rw-r--r-- | spa/examples/meson.build | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spa/examples/meson.build b/spa/examples/meson.build new file mode 100644 index 0000000..7064a06 --- /dev/null +++ b/spa/examples/meson.build @@ -0,0 +1,32 @@ +# Examples, in order from simple to complicated +spa_examples = [ + 'adapter-control', + 'example-control', + 'local-libcamera', + 'local-v4l2', +] + +spa_examples_extra_deps = { + 'local-v4l2': [sdl_dep], + 'local-libcamera': [sdl_dep, libcamera_dep], +} + +foreach c : spa_examples + deps = spa_examples_extra_deps.get(c, []) + + found = true + foreach dep : deps + found = found and dep.found() + endforeach + + if found + executable( + c, + c + '.c', + include_directories : [configinc], + dependencies : [spa_dep, dl_lib, pthread_lib, mathlib] + deps, + install : installed_tests_enabled, + install_dir : installed_tests_execdir / 'examples' / 'spa' + ) + endif +endforeach |