Fix an incorrect call to soup_message_set_request.
[pidgin-git.git] / libpurple / meson.build
blob6cca60510d5fc178695610863fb89c7f3ac97901
1 purple_coresources = [
2         'account.c',
3         'accounts.c',
4         'action.c',
5         'attention.c',
6         'blistnode.c',
7         'buddy.c',
8         'buddylist.c',
9         'buddyicon.c',
10         'chat.c',
11         'circularbuffer.c',
12         'cmds.c',
13         'connection.c',
14         'contact.c',
15         'conversation.c',
16         'conversationtypes.c',
17         'conversations.c',
18         'core.c',
19         'countingnode.c',
20         'debug.c',
21         'e2ee.c',
22         'eventloop.c',
23         'group.c',
24         'http.c',
25         'idle.c',
26         'image.c',
27         'image-store.c',
28         'keyring.c',
29         'log.c',
30         'media/backend-iface.c',
31         'media/candidate.c',
32         'media/codec.c',
33         'media/enum-types.c',
34         'media.c',
35         'mediamanager.c',
36         'memorypool.c',
37         'message.c',
38         'nat-pmp.c',
39         'network.c',
40         'notify.c',
41         'options.c',
42         'plugins.c',
43         'pluginpref.c',
44         'pounce.c',
45         'prefs.c',
46         'presence.c',
47         'proxy.c',
48         'protocol.c',
49         'protocols.c',
50         'purple-gio.c',
51         'purpleaccountoption.c',
52         'purpleaccountusersplit.c',
53         'queuedoutputstream.c',
54         'request.c',
55         'request-datasheet.c',
56         'roomlist.c',
57         'savedstatuses.c',
58         'server.c',
59         'signals.c',
60         'smiley-custom.c',
61         'smiley-list.c',
62         'smiley-parser.c',
63         'smiley-theme.c',
64         'smiley.c',
65         'status.c',
66         'stringref.c',
67         'stun.c',
68         'sound.c',
69         'sound-theme.c',
70         'sound-theme-loader.c',
71         'sslconn.c',
72         'theme.c',
73         'theme-loader.c',
74         'theme-manager.c',
75         'trie.c',
76         'upnp.c',
77         'util.c',
78         'version.c',
79         'whiteboard.c',
80         'xfer.c',
81         'xmlnode.c'
84 purple_coreheaders = [
85         'account.h',
86         'accounts.h',
87         'action.h',
88         'attention.h',
89         'blistnode.h',
90         'buddy.h',
91         'buddylist.h',
92         'buddyicon.h',
93         'chat.h',
94         'circularbuffer.h',
95         'cmds.h',
96         'connection.h',
97         'contact.h',
98         'conversation.h',
99         'conversationtypes.h',
100         'conversations.h',
101         'core.h',
102         'countingnode.h',
103         'debug.h',
104         'e2ee.h',
105         'eventloop.h',
106         'group.h',
107         'http.h',
108         'idle.h',
109         'image.h',
110         'image-store.h',
111         'keyring.h',
112         'log.h',
113         'media.h',
114         'mediamanager.h',
115         'memorypool.h',
116         'message.h',
117         'nat-pmp.h',
118         'network.h',
119         'notify.h',
120         'options.h',
121         'plugins.h',
122         'pluginpref.h',
123         'pounce.h',
124         'prefs.h',
125         'presence.h',
126         'proxy.h',
127         'protocol.h',
128         'protocols.h',
129         'purple-gio.h',
130         'purpleaccountoption.h',
131         'purpleaccountusersplit.h',
132         'queuedoutputstream.h',
133         'request.h',
134         'request-datasheet.h',
135         'roomlist.h',
136         'savedstatuses.h',
137         'server.h',
138         'signals.h',
139         'smiley-custom.h',
140         'smiley-list.h',
141         'smiley-parser.h',
142         'smiley-theme.h',
143         'smiley.h',
144         'status.h',
145         'stringref.h',
146         'stun.h',
147         'sound.h',
148         'sound-theme.h',
149         'sound-theme-loader.h',
150         'sslconn.h',
151         'tests.h',
152         'theme.h',
153         'theme-loader.h',
154         'theme-manager.h',
155         'trie.h',
156         'upnp.h',
157         'util.h',
158         'whiteboard.h',
159         'xfer.h',
160         'xmlnode.h',
163 purple_filebase = 'purple-@0@'.format(purple_major_version)
164 purple_include_base = join_paths(purple_filebase, 'libpurple')
166 if gstreamer.found()
167         purple_coresources += 'media/backend-fs2.c'
168 endif
169 if enable_vv
170         purple_coreheaders += 'media-gst.h'
171 endif
173 if IS_WIN32
174         purple_coresources += [
175                 'win32/libc_interface.c',
176                 'win32/win32dep.c'
177         ]
179         purple_coreheaders += [
180                 'win32/libc_interface.h',
181                 'win32/libc_internal.h',
182                 'win32/win32dep.h',
183                 'win32/wpurpleerror.h'
184         ]
186         libpurplerc = configure_file(
187             input : 'win32/libpurplerc.rc.in',
188             output : 'libpurplerc.rc',
189             configuration : version_conf)
190         purple_coresources += windows.compile_resources(libpurplerc)
191 endif
193 purple_mediaheaders = [
194         'media/backend-iface.h',
195         'media/candidate.h',
196         'media/codec.h',
197         'media/enum-types.h'
200 purple_enumheaders = [
201         'account.h',
202         'buddyicon.h',
203         'connection.h',
204         'conversation.h',
205         'conversationtypes.h',
206         'debug.h',
207         'eventloop.h',
208         'notify.h',
209         'plugins.h',
210         'protocol.h',
211         'protocols.h',
212         'roomlist.h',
213         'status.h',
214         'sound.h',
215         'xfer.h',
216         'xmlnode.h'
220 enums = gnome.mkenums('enums',
221     sources : purple_enumheaders,
222     h_template : 'enums.h.in',
223     c_template : 'enums.c.in',
224     install_header : true,
225     install_dir : join_paths(get_option('includedir'), purple_include_base))
226 enums_c = enums[0]
227 enums_h = enums[1]
229 PURPLE_H_INCLUDES = []
230 foreach header : purple_coreheaders + purple_mediaheaders + ['version.h', 'enums.h']
231         PURPLE_H_INCLUDES += '#include <libpurple/@0@>'.format(header)
232 endforeach
233 purple_h_conf = configuration_data()
234 purple_h_conf.set('PURPLE_H_INCLUDES', '\n'.join(PURPLE_H_INCLUDES))
236 purple_h = configure_file(input : 'purple.h.in',
237                           output : 'purple.h',
238                           configuration : purple_h_conf,
239                           install : true,
240                           install_dir : join_paths(get_option('includedir'),
241                                                    purple_filebase))
242 version_h = configure_file(input : 'version.h.in',
243                            output : 'version.h',
244                            configuration : version_conf,
245                            install : true,
246                            install_dir : join_paths(get_option('includedir'),
247                                                     purple_include_base))
249 purple_builtsources = [
250         enums_c,
253 purple_builtheaders = [
254         purple_h,
255         version_h,
256         enums_h,
259 libpurple_inc = include_directories('.')
260 libpurple = library('purple',
261                     purple_coresources + purple_builtsources +
262                     purple_builtheaders,
263                     include_directories : [toplevel_inc, libpurple_inc],
264                     install : true,
265                     version : PURPLE_LIB_VERSION,
266                     dependencies : # static_link_libs
267                         [dnsapi, ws2_32, glib, gio, gplugin_dep, libsoup,
268                          libxml, farstream, gstreamer, gstreamer_video,
269                          gstreamer_app, json, math])
271 libpurple_dep = declare_dependency(
272     # Ensure purple headers built before any dependencies:
273     sources : [purple_builtheaders],
274     include_directories : [toplevel_inc, libpurple_inc],
275     link_with : libpurple,
276     dependencies : [gstreamer, gplugin_dep, glib, gio])
278 install_headers(purple_coreheaders,
279                 subdir : purple_include_base)
281 install_headers(purple_mediaheaders,
282                 subdir : join_paths(purple_include_base, 'media'))
284 pkgconfig.generate(
285     name : 'libpurple',
286     description : 'libpurple is a GLib-based instant messenger library.',
287     version : meson.project_version(),
288     filebase : purple_filebase,
289 # TODO: Only use purple_filebase once everything is ported to only use purple.h
290     subdirs : [purple_filebase, purple_include_base],
291     libraries : [libpurple],
292     requires : ['glib-2.0', 'gplugin'],
293     variables : ['plugindir=${libdir}/@0@'.format(purple_filebase)])
295 if enable_introspection
296         introspection_sources = (purple_coreheaders + purple_builtheaders +
297                                  purple_mediaheaders)
299         Purple_gir_includes = ['GObject-2.0', 'Gio-2.0', gplugin_gir]
300         if gstreamer.found()
301                 Purple_gir_includes += ['Gst-1.0']
302         endif
304         libpurple_gir = gnome.generate_gir(libpurple,
305             sources : introspection_sources,
306             includes : Purple_gir_includes,
307             namespace : 'Purple',
308             symbol_prefix : 'purple',
309             identifier_prefix : 'Purple',
310             export_packages : purple_filebase,
311             nsversion : '@0@.@1@'.format(purple_major_version,
312                                          purple_minor_version),
313             include_directories : [
314                 gplugin_include_directories,
315             ],
316             install : true,
317             extra_args : ['--quiet'])
318 endif
320 subdir('tests')
321 subdir('example')
322 subdir('plugins')
323 subdir('protocols')