build: meson: build examples
[platform/upstream/gstreamer.git] / tests / meson.build
1 libdecutils_sources = [
2   'decoder.c',
3   'test-h264.c',
4   'test-jpeg.c',
5   'test-mpeg2.c',
6   'test-mpeg4.c',
7   'test-vc1.c',
8 ]
9
10 libdecutils_headers = [
11   'decoder.h',
12   'test-h264.h',
13   'test-jpeg.h',
14   'test-mpeg2.h',
15   'test-mpeg4.h',
16   'test-vc1.h',
17 ]
18
19 libutils_sources = [
20   'codec.c',
21   'image.c',
22   'output.c',
23   'test-subpicture-data.c',
24   'y4mreader.c',
25 ]
26
27 libutils_headers = [
28   'codec.h',
29   'image.h',
30   'output.h',
31   'test-subpicture-data.h',
32   'y4mreader.h',
33 ]
34
35 test_examples = [
36   'simple-decoder',
37   'test-decode',
38   'test-display',
39   'test-filter',
40   'test-surfaces',
41   'test-windows',
42   'test-subpicture',
43 ]
44
45 if USE_ENCODERS
46   test_examples += [ 'simple-encoder' ]
47 endif
48 if USE_GLX
49   test_examples += [ 'test-textures' ]
50 endif
51
52 libutils = static_library('libutils',
53   libutils_sources + libutils_headers,
54   c_args : gstreamer_vaapi_args,
55   include_directories: [configinc, libsinc],
56   dependencies : gstlibvaapi_deps,
57   install: false)
58
59 libdecutils = static_library('libdecutils',
60   libdecutils_sources + libdecutils_headers,
61   c_args : gstreamer_vaapi_args,
62   include_directories: [configinc, libsinc],
63   dependencies : gstlibvaapi_deps,
64   install: false)
65
66 foreach example : test_examples
67   executable(example, '@0@.c'.format(example),
68     c_args : gstreamer_vaapi_args,
69     include_directories: [configinc, libsinc],
70     dependencies : [gst_dep, libva_dep,  gstlibvaapi_dep],
71     link_with: [libutils, libdecutils],
72     install: false)
73 endforeach
74
75 subdir('elements')