17 'conversationtypes.c',
31 'media/backend-iface.c',
52 'queuedoutputstream.c',
54 'request-datasheet.c',
69 'sound-theme-loader.c',
83 purple_coreheaders = [
99 'conversationtypes.h',
130 'queuedoutputstream.h',
132 'request-datasheet.h',
147 'sound-theme-loader.h',
161 purple_filebase = 'purple-@0@'.format(purple_major_version)
162 purple_include_base = join_paths(purple_filebase, 'libpurple')
165 purple_coresources += 'media/backend-fs2.c'
168 purple_coreheaders += 'media-gst.h'
172 purple_coresources += [
173 'win32/libc_interface.c',
177 purple_coreheaders += [
178 'win32/libc_interface.h',
179 'win32/libc_internal.h',
181 'win32/wpurpleerror.h'
184 libpurplerc = configure_file(
185 input : 'win32/libpurplerc.rc.in',
186 output : 'libpurplerc.rc',
187 configuration : version_conf)
188 purple_coresources += windows.compile_resources(libpurplerc)
191 purple_mediaheaders = [
192 'media/backend-iface.h',
198 purple_enumheaders = [
203 'conversationtypes.h',
218 enums = gnome.mkenums('enums',
219 sources : purple_enumheaders,
220 h_template : 'enums.h.in',
221 c_template : 'enums.c.in',
222 install_header : true,
223 install_dir : join_paths(get_option('includedir'), purple_include_base))
227 PURPLE_H_INCLUDES = []
228 foreach header : purple_coreheaders + purple_mediaheaders + ['version.h', 'enums.h']
229 PURPLE_H_INCLUDES += '#include <libpurple/@0@>'.format(header)
231 purple_h_conf = configuration_data()
232 purple_h_conf.set('PURPLE_H_INCLUDES', '\n'.join(PURPLE_H_INCLUDES))
234 purple_h = configure_file(input : 'purple.h.in',
236 configuration : purple_h_conf,
238 install_dir : join_paths(get_option('includedir'),
240 version_h = configure_file(input : 'version.h.in',
241 output : 'version.h',
242 configuration : version_conf,
244 install_dir : join_paths(get_option('includedir'),
245 purple_include_base))
247 purple_builtsources = [
251 purple_builtheaders = [
257 libpurple_inc = include_directories('.')
258 libpurple = library('purple',
259 purple_coresources + purple_builtsources +
261 include_directories : [toplevel_inc, libpurple_inc],
263 version : PURPLE_LIB_VERSION,
264 dependencies : # static_link_libs
265 [dnsapi, ws2_32, glib, gio, gplugin_dep, libxml,
266 farstream, gstreamer, gstreamer_video,
267 gstreamer_app, json, math])
269 libpurple_dep = declare_dependency(
270 # Ensure purple headers built before any dependencies:
271 sources : [purple_builtheaders],
272 include_directories : [toplevel_inc, libpurple_inc],
273 link_with : libpurple,
274 dependencies : [gstreamer, gplugin_dep, glib, gio])
276 install_headers(purple_coreheaders,
277 subdir : purple_include_base)
279 install_headers(purple_mediaheaders,
280 subdir : join_paths(purple_include_base, 'media'))
284 description : 'libpurple is a GLib-based instant messenger library.',
285 version : meson.project_version(),
286 filebase : purple_filebase,
287 # TODO: Only use purple_filebase once everything is ported to only use purple.h
288 subdirs : [purple_filebase, purple_include_base],
289 libraries : [libpurple],
290 requires : ['glib-2.0', 'gplugin'],
291 variables : ['plugindir=${libdir}/@0@'.format(purple_filebase)])
293 if enable_introspection
294 introspection_sources = (purple_coreheaders + purple_builtheaders +
297 Purple_gir_includes = ['GObject-2.0', 'Gio-2.0', gplugin_gir]
299 Purple_gir_includes += ['Gst-1.0']
302 libpurple_gir = gnome.generate_gir(libpurple,
303 sources : introspection_sources,
304 includes : Purple_gir_includes,
305 namespace : 'Purple',
306 symbol_prefix : 'purple',
307 identifier_prefix : 'Purple',
308 export_packages : purple_filebase,
309 nsversion : '@0@.@1@'.format(purple_major_version,
310 purple_minor_version),
311 include_directories : [
312 gplugin_include_directories,
315 extra_args : ['--quiet'])