16 'conversationtypes.c',
30 'media/backend-iface.c',
51 'purpleaccountoption.c',
52 'purpleaccountusersplit.c',
53 'queuedoutputstream.c',
55 'request-datasheet.c',
70 'sound-theme-loader.c',
84 purple_coreheaders = [
99 'conversationtypes.h',
130 'purpleaccountoption.h',
131 'purpleaccountusersplit.h',
132 'queuedoutputstream.h',
134 'request-datasheet.h',
149 'sound-theme-loader.h',
163 purple_filebase = 'purple-@0@'.format(purple_major_version)
164 purple_include_base = join_paths(purple_filebase, 'libpurple')
167 purple_coresources += 'media/backend-fs2.c'
170 purple_coreheaders += 'media-gst.h'
174 purple_coresources += [
175 'win32/libc_interface.c',
179 purple_coreheaders += [
180 'win32/libc_interface.h',
181 'win32/libc_internal.h',
183 'win32/wpurpleerror.h'
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)
193 purple_mediaheaders = [
194 'media/backend-iface.h',
200 purple_enumheaders = [
205 'conversationtypes.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))
229 PURPLE_H_INCLUDES = []
230 foreach header : purple_coreheaders + purple_mediaheaders + ['version.h', 'enums.h']
231 PURPLE_H_INCLUDES += '#include <libpurple/@0@>'.format(header)
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',
238 configuration : purple_h_conf,
240 install_dir : join_paths(get_option('includedir'),
242 version_h = configure_file(input : 'version.h.in',
243 output : 'version.h',
244 configuration : version_conf,
246 install_dir : join_paths(get_option('includedir'),
247 purple_include_base))
249 purple_builtsources = [
253 purple_builtheaders = [
259 libpurple_inc = include_directories('.')
260 libpurple = library('purple',
261 purple_coresources + purple_builtsources +
263 include_directories : [toplevel_inc, libpurple_inc],
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'))
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 +
299 Purple_gir_includes = ['GObject-2.0', 'Gio-2.0', gplugin_gir]
301 Purple_gir_includes += ['Gst-1.0']
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,
317 extra_args : ['--quiet'])