summaryrefslogtreecommitdiffstats
path: root/src/examples/meson.build
blob: e2f260085b254530c2d5d40ff8a95198dfa6fcb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Examples, in order from simple to complicated
examples = [
  'audio-src',
  'audio-dsp-src',
  'audio-dsp-filter',
  'audio-capture',
  'video-play',
  'video-src',
  'video-dsp-play',
  'video-play-pull',
  'video-play-reneg',
  'video-src-alloc',
  'video-src-reneg',
  'video-src-fixate',
  'video-play-fixate',
  'export-sink',
  'export-source',
  'export-spa',
  'export-spa-device',
  'bluez-session',
  'local-v4l2',
]

examples_extra_deps = {
  'video-src-fixate': [drm_dep],
  'video-play': [sdl_dep],
  'video-play-reneg': [sdl_dep],
  'video-play-fixate': [sdl_dep, drm_dep],
  'video-play-pull': [sdl_dep],
  'video-dsp-play': [sdl_dep],
  'local-v4l2': [sdl_dep],
  'export-sink': [sdl_dep],
}

foreach c : examples
  deps = examples_extra_deps.get(c, [])

  found = true
  foreach dep : deps
    found = found and dep.found()
  endforeach

  if found
    executable(
      c, c + '.c',
      install : installed_tests_enabled,
      install_dir : installed_tests_execdir / 'examples',
      dependencies : [pipewire_dep, mathlib] + deps,
    )
  endif
endforeach