diff options
Diffstat (limited to 'src/tests/meson.build')
-rw-r--r-- | src/tests/meson.build | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/tests/meson.build b/src/tests/meson.build new file mode 100644 index 0000000..335c6b1 --- /dev/null +++ b/src/tests/meson.build @@ -0,0 +1,39 @@ +ts = [] + +foreach t : tests + deps = [tdep_static] + if t == 'opengl_surfaceless.c' + deps += glad_dep + endif + # TODO: Define objects in tdep_static once Meson 1.1.0 is ok to use + ts += { 'source': t, + 'deps': deps, + 'objects': lib.extract_all_objects(recursive: false) } +endforeach + +dav1d = dependency('dav1d', required: false) +if dav1d.found() + ts += { 'source': 'dav1d.c', 'deps': [dav1d, tdep_shared] } +endif + +lavu = dependency('libavutil', version: '>=55.74.100', required: false) +lavc = dependency('libavcodec', required: false) +lavf = dependency('libavformat', required: false) +libav_found = lavu.found() and lavc.found() and lavf.found() +if libav_found + ts += { 'source': 'libav.c', 'deps': [lavu, lavc, lavf, tdep_shared] } +endif + +foreach t : ts + e = executable('test.' + t['source'], t['source'], + objects: t.get('objects', []), + c_args: [ '-Wno-unused-function' ], + dependencies: t.get('deps', []), + link_args: link_args, + link_depends: link_depends, + ) + + test(t['source'], e, timeout: 120) +endforeach + +subdir('include') |