summaryrefslogtreecommitdiff
path: root/pipewire-pulseaudio/src/meson.build
blob: 332824f6ddb97693de590c9270a06094939dcf00 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pipewire_pulseaudio_sources = [
  'bitset.c',
  'channelmap.c',
  'context.c',
  'core-format.c',
  'direction.c',
  'error.c',
  'ext-device-manager.c',
  'ext-device-restore.c',
  'ext-stream-restore.c',
  'format.c',
  'introspect.c',
  'json.c',
  'mainloop.c',
  'mainloop-signal.c',
  'operation.c',
  'proplist.c',
  'rtclock.c',
  'sample.c',
  'scache.c',
  'stream.c',
  'strbuf.c',
  'subscribe.c',
  'thread-mainloop.c',
  'timeval.c',
  'utf8.c',
  'util.c',
  'version.c',
  'volume.c',
  'xmalloc.c',
  'pipewire-pulseaudio.c',
]

pipewire_mainloop_glib_sources = [
  'mainloop-glib.c',
]

pipewire_mainloop_simple_sources = [
  'simple.c',
]

pipewire_pulseaudio_c_args = [
  '-DHAVE_CONFIG_H',
  '-D_GNU_SOURCE',
  '-DPIC',
]

mapfile = 'map-file'
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)

libpulse_path = get_option('libpulse-path')
if libpulse_path == ''
  libpulse_path = join_paths(modules_install_dir, 'pulse')
  libpulse_path_dlopen = join_paths(modules_install_dir_dlopen, 'pulse')
else
  libpulse_path_dlopen = libpulse_path
endif

tools_config = configuration_data()
tools_config.set('LIBPULSE_PATH', libpulse_path_dlopen)

configure_file(input : 'pw-pulse.in',
               output : 'pw-pulse',
               configuration : tools_config,
               install_dir : pipewire_bindir)

pipewire_pulseaudio = shared_library('pulse',
    pipewire_pulseaudio_sources,
    soversion : soversion,
    version : libversion,
    c_args : pipewire_pulseaudio_c_args,
    link_args : vflag,
    include_directories : [configinc],
    dependencies : [pipewire_dep, pulseaudio_dep, mathlib],
    install : true,
    install_dir : libpulse_path,
)

pipewire_pulseaudio = shared_library('pulse-mainloop-glib',
    pipewire_mainloop_glib_sources,
    soversion : soversion,
    version : libversion,
    c_args : pipewire_pulseaudio_c_args,
    link_args : vflag,
    include_directories : [configinc],
    dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep],
    install : true,
    install_dir : libpulse_path,
)

pipewire_pulseaudio = shared_library('pulse-simple',
    pipewire_mainloop_simple_sources,
    soversion : soversion,
    version : libversion,
    c_args : pipewire_pulseaudio_c_args,
    link_args : vflag,
    include_directories : [configinc],
    dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep],
    install : true,
    install_dir : libpulse_path,
)