meson.build 1.74 KB
Newer Older
Wim Taymans's avatar
Wim Taymans committed
1
2
3
4
5
6
7
8
tools_sources = [
  [ 'pw-mon', [ 'pw-mon.c' ] ],
  [ 'pw-dot', [ 'pw-dot.c' ] ],
  [ 'pw-dump', [ 'pw-dump.c' ] ],
  [ 'pw-profiler', [ 'pw-profiler.c' ] ],
  [ 'pw-mididump', [ 'pw-mididump.c', 'midifile.c' ] ],
  [ 'pw-metadata', [ 'pw-metadata.c' ] ],
  [ 'pw-loopback', [ 'pw-loopback.c' ] ],
Wim Taymans's avatar
Wim Taymans committed
9
  [ 'pw-link', [ 'pw-link.c' ] ],
Wim Taymans's avatar
Wim Taymans committed
10
11
12
13
]

foreach t : tools_sources
  executable(t.get(0),
14
15
16
    t.get(1),
    install: true,
    dependencies : [pipewire_dep, mathlib],
Wim Taymans's avatar
Wim Taymans committed
17
18
  )
endforeach
Wim Taymans's avatar
Wim Taymans committed
19

20
21
22
23
24
25
26
27
if readline_dep.found()
  executable('pw-cli',
    'pw-cli.c',
    install: true,
    dependencies: [pipewire_dep, readline_dep]
  )
endif

Wim Taymans's avatar
Wim Taymans committed
28
29
if ncurses_dep.found()
  executable('pw-top',
30
31
32
    'pw-top.c',
    install: true,
    dependencies : [pipewire_dep, ncurses_dep],
Wim Taymans's avatar
Wim Taymans committed
33
34
35
  )
endif

36
build_pw_cat = false
37
if get_option('pw-cat').allowed() and sndfile_dep.found()
38
  build_pw_cat = true
39
40

  pwcat_sources = [
Wim Taymans's avatar
Wim Taymans committed
41
    'pw-cat.c',
Wim Taymans's avatar
Wim Taymans committed
42
    'midifile.c',
Wim Taymans's avatar
Wim Taymans committed
43
    'dsffile.c',
44
45
46
  ]

  pwcat_aliases = [
Wim Taymans's avatar
Wim Taymans committed
47
48
    'pw-play',
    'pw-record',
49
50
    'pw-midiplay',
    'pw-midirecord',
51
    'pw-dsdplay',
52
53
  ]

Wim Taymans's avatar
Wim Taymans committed
54
  executable('pw-cat',
55
56
57
58
59
60
    pwcat_sources,
    install: true,
    dependencies : [sndfile_dep, pipewire_dep, mathlib],
  )

  foreach alias : pwcat_aliases
61
    dst = pipewire_bindir / alias
Wim Taymans's avatar
Wim Taymans committed
62
    cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pw-cat', dst)
63
64
    meson.add_install_script('sh', '-c', cmd)
  endforeach
65
elif not sndfile_dep.found() and get_option('pw-cat').enabled()
66
  error('pw-cat is enabled but required dependency `sndfile` was not found.')
67
endif
68
summary({'Build pw-cat tool': build_pw_cat}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump tool')
69

70
71
if dbus_dep.found()
  executable('pw-reserve',
72
    'reserve.h',
73
    'reserve.c',
74
75
76
77
78
    'pw-reserve.c',
    install: true,
    dependencies : [dbus_dep, pipewire_dep],
  )
endif