summaryrefslogtreecommitdiffstats
path: root/src/pulse/meson.build
blob: aaebff53ed7ac7b33002d20847f7ab2f42bab983 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
configure_file(
  input : 'version.h.in',
  output : 'version.h',
  configuration : cdata,
  install_dir : join_paths(includedir, 'pulse'),
)

libpulse_sources = [
  'channelmap.c',
  'context.c',
  'direction.c',
  'error.c',
  'ext-device-manager.c',
  'ext-device-restore.c',
  'ext-stream-restore.c',
  'format.c',
  'internal.h',
  'introspect.c',
  'mainloop-api.c',
  'mainloop-signal.c',
  'mainloop.c',
  'operation.c',
  'proplist.c',
  'rtclock.c',
  'sample.c',
  'scache.c',
  'stream.c',
  'subscribe.c',
  'thread-mainloop.c',
  'timeval.c',
  'utf8.c',
  'util.c',
  'volume.c',
  'xmalloc.c',
]

libpulse_headers = [
  'cdecl.h',
  'channelmap.h',
  'context.h',
  'def.h',
  'direction.h',
  'error.h',
  'ext-device-manager.h',
  'ext-device-restore.h',
  'ext-stream-restore.h',
  'format.h',
  'gccmacro.h',
  'introspect.h',
  'mainloop-api.h',
  'mainloop-signal.h',
  'mainloop.h',
  'operation.h',
  'proplist.h',
  'pulseaudio.h',
  'rtclock.h',
  'sample.h',
  'scache.h',
  'stream.h',
  'subscribe.h',
  'thread-mainloop.h',
  'timeval.h',
  'utf8.h',
  'util.h',
  'volume.h',
  'xmalloc.h',
]

if glib_dep.found()
  libpulse_headers += 'glib-mainloop.h'
endif

versioning_link_args = '-Wl,-version-script=' + join_paths(meson.source_root(), 'src', 'map-file')

libpulse = shared_library('pulse',
  libpulse_sources,
  libpulse_headers,
  version : libpulse_version,
  include_directories : [configinc, topinc],
  c_args : [pa_c_args],
  link_args : [nodelete_link_args, versioning_link_args],
  install : true,
  install_rpath : privlibdir,
  dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep, libintl_dep],
  implicit_include_directories : false)

libpulse_dep = declare_dependency(link_with: libpulse)

install_headers(
  libpulse_headers, 'simple.h',
  subdir : 'pulse'
)

libpulse_simple = shared_library('pulse-simple',
  'simple.c',
  'simple.h',
  version : libpulse_simple_version,
  c_args : [pa_c_args],
  link_args : [nodelete_link_args, versioning_link_args],
  include_directories : [configinc, topinc],
  dependencies : [libpulse_dep, libpulsecommon_dep],
  install : true,
  install_rpath : privlibdir,
)

libpulse_simple_dep = declare_dependency(link_with: libpulse_simple)

if glib_dep.found()
  libpulse_mainloop_glib = shared_library('pulse-mainloop-glib',
    'glib-mainloop.c',
    'glib-mainloop.h',
    version : libpulse_mainloop_glib_version,
    c_args : [pa_c_args],
    link_args : [nodelete_link_args, versioning_link_args],
    include_directories : [configinc, topinc],
    dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
    install : true,
    install_rpath : privlibdir,
  )

  libpulse_mainloop_glib_dep = declare_dependency(link_with: libpulse_mainloop_glib)
endif

# Configuration files

client_conf = configuration_data()
client_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY'))

client_conf_file = configure_file(
  input : 'client.conf.in',
  output : 'client.conf',
  configuration : client_conf,
  install_dir : pulsesysconfdir,
)