15 'conversationtypes.c',
29 'media/backend-fs2.c',
30 'media/backend-iface.c',
51 'queuedoutputstream.c',
53 'request-datasheet.c',
68 'sound-theme-loader.c',
74 'tls-certificate-info.c',
84 purple_coreheaders = [
98 'conversationtypes.h',
130 'queuedoutputstream.h',
132 'request-datasheet.h',
147 'sound-theme-loader.h',
154 'tls-certificate-info.h',
164 purple_coreheaders += 'media-gst.h'
168 purple_coresources += [
169 'win32/libc_interface.c',
173 purple_coreheaders += [
174 'win32/libc_interface.h',
175 'win32/libc_internal.h',
177 'win32/wpurpleerror.h'
180 libpurplerc = configure_file(
181 input : 'win32/libpurplerc.rc.in',
182 output : 'libpurplerc.rc',
183 configuration : version_conf)
184 purple_coresources += windows.compile_resources(libpurplerc)
187 purple_mediaheaders = [
188 'media/backend-iface.h',
194 purple_enumheaders = [
199 'conversationtypes.h',
214 enums = gnome.mkenums('enums',
215 sources : purple_enumheaders,
216 h_template : 'enums.h.in',
217 c_template : 'enums.c.in',
218 install_header : true,
219 install_dir : get_option('includedir') + '/libpurple')
223 purple_h = configure_file(input : 'purple.h.in',
225 configuration : conf,
227 install_dir : get_option('includedir') + '/libpurple')
228 version_h = configure_file(input : 'version.h.in',
229 output : 'version.h',
230 configuration : version_conf,
232 install_dir : get_option('includedir') + '/libpurple')
234 purple_builtsources = [
238 purple_builtheaders = [
270 'conversationtypes.h',
290 purple_build_coreheaders = purple_coreheaders + purple_mediaheaders
291 purple_build_coreheaders += purple_builtheaders
294 # We should probably make this better
295 dbus_signals = purple_coresources + ['protocols/irc/irc.c', 'protocols/jabber/jabber.c']
297 dbus_analyze_functions = files('dbus-analyze-functions.py')[0]
298 dbus_analyze_signals = files('dbus-analyze-signals.py')[0]
299 dbus_analyze_types = files('dbus-analyze-types.py')[0]
301 dbus_types_c = custom_target('dbus_types_c',
302 input : purple_build_coreheaders,
303 output : 'dbus-types.ch',
304 command : [python, dbus_analyze_types, '-o', '@OUTPUT@',
305 '--pattern=PURPLE_DBUS_DEFINE_TYPE(%s)', '@INPUT@'])
307 dbus_types_h = custom_target('dbus_types_h',
308 input : purple_build_coreheaders,
309 output : 'dbus-types.h',
310 command : [python, dbus_analyze_types, '-o', '@OUTPUT@',
311 '--pattern=PURPLE_DBUS_DECLARE_TYPE(%s)', '@INPUT@'],
313 install_dir : join_paths(get_option('includedir'), 'libpurple'))
315 dbus_bindings_c = custom_target('dbus_bindings_c',
316 input : dbus_exported,
317 output : 'dbus-bindings.ch',
318 command : [python, dbus_analyze_functions, '-o', '@OUTPUT@',
321 dbus_signals_c = custom_target('dbus_signals_c',
322 input : dbus_signals,
323 output : 'dbus-signals.ch',
324 command : [python, dbus_analyze_signals, '-o', '@OUTPUT@',
327 dbus_builtheaders = [dbus_types_h]
328 dbus_builtsources = [dbus_types_c, dbus_bindings_c, dbus_signals_c]
332 purple_client_bindings_h1 = custom_target('purple_client_bindings_h1',
333 input : purple_build_coreheaders,
334 output : 'purple-client-bindings1.h',
336 python, dbus_analyze_types,
337 '--keyword=enum', '--verbatim', '-o', '@OUTPUT@', '@INPUT@'
341 purple_client_bindings_h2 = custom_target('purple_client_bindings_h2',
342 input : dbus_exported,
343 output : 'purple-client-bindings2.h',
345 python, dbus_analyze_functions,
346 '--client', '--headers', '-o', '@OUTPUT@', '@INPUT@'
350 purple_client_bindings_h = custom_target('purple_client_bindings_h',
351 input : [purple_client_bindings_h1, purple_client_bindings_h2],
352 output : 'purple-client-bindings.h',
354 command : ['cat', '@INPUT@'])
356 purple_client_bindings_c = custom_target('purple_client_bindings_c',
357 input : dbus_exported,
358 output : 'purple-client-bindings.ch',
360 python, dbus_analyze_functions,
361 '--client', '-o', '@OUTPUT@', '@INPUT@'
365 libpurple_client = library('purple-client',
366 'purple-client.c', purple_client_bindings_c, purple_client_bindings_h,
367 version : PURPLE_LIB_VERSION,
368 dependencies : [dbus, dbus_glib],
373 install_data(['purple-remote', 'purple-send', 'purple-send-async', 'purple-url-handler'],
374 install_dir : get_option('bindir'))
380 dbus_builtsources = []
381 dbus_builtheaders = []
385 libpurple_inc = include_directories('.')
386 libpurple = library('purple',
387 purple_coresources + purple_builtsources +
388 dbus_sources + dbus_builtsources +
389 purple_builtheaders + dbus_builtheaders,
390 include_directories : [toplevel_inc, libpurple_inc],
392 version : PURPLE_LIB_VERSION,
393 dependencies : # static_link_libs
394 [dbus, dbus_glib, dnsapi, ws2_32, glib, gio, gplugin, libxml,
395 farstream, gstreamer, gstreamer_video,
396 gstreamer_app, idn, json, math])
397 libpurple_dep = declare_dependency(
398 sources : purple_builtheaders, # Ensure built before any dependencies.
399 include_directories : [toplevel_inc, libpurple_inc],
400 link_with : libpurple,
401 dependencies : [gstreamer, gplugin, glib, gio])
405 # purple-client-example
407 purple_client_example = executable('purple-client-example',
408 'purple-client-example.c', purple_client_bindings_h,
409 link_with : [libpurple_client, libpurple],
410 dependencies : [dbus, dbus_glib, glib],
415 install_headers(purple_coreheaders + dbus_headers,
416 subdir : 'libpurple')
418 install_headers(purple_mediaheaders,
419 subdir : 'libpurple/media')
421 configure_file(input : 'data/purple-3.pc.in',
422 output : 'purple-3.pc',
423 configuration : pkg_conf,
425 install_dir : get_option('libdir') + '/pkgconfig')
428 DESKTOP_FILE = 'purple-url-handler.desktop'
429 desktop_file_in = configure_file(
430 input : 'data/' + DESKTOP_FILE + '.in.in',
431 output : DESKTOP_FILE + '.in',
432 configuration : conf)
433 desktop_file = custom_target(DESKTOP_FILE,
434 input : desktop_file_in,
435 output : DESKTOP_FILE,
436 command : [intltool_merge, '--desktop-style', '-u',
437 '-c', '@BUILD_DIR@/po/.intltool-merge-cache',
438 meson.source_root() + '/po', '@INPUT@', '@OUTPUT@'],
440 install_dir : get_option('datadir') + '/applications')
443 if enable_introspection
444 introspection_sources = (purple_coreheaders + purple_builtheaders +
445 dbus_headers + purple_mediaheaders)
447 Purple_gir_includes = ['GObject-2.0', 'Gio-2.0']
449 Purple_gir_includes += ['GPlugin-0.0']
452 Purple_gir_includes += ['DBus-1.0', 'DBusGLib-1.0']
455 Purple_gir_includes += ['Gst-1.0']
458 libpurple_gir = gnome.generate_gir(libpurple,
459 sources : introspection_sources,
460 includes : Purple_gir_includes,
461 namespace : 'Purple',
462 symbol_prefix : 'purple',
463 identifier_prefix : 'Purple',
464 export_packages : 'purple-@0@'.format(purple_major_version),
465 nsversion : '@0@.@1@'.format(purple_major_version,
466 purple_minor_version),