-
Notifications
You must be signed in to change notification settings - Fork 3
/
meson.build
102 lines (86 loc) · 2.77 KB
/
meson.build
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
project('purple-events', 'c',
version: '0.99.3',
meson_version: '>=0.58.0',
license: [ 'GPL3+' ],
default_options: [
'c_std=gnu11',
'warning_level=2',
],
)
purple_min_version='2.6.0'
package_developer='sardemff7'
glib = dependency('glib-2.0')
purple = dependency('purple', version: '>= @0@'.format(purple_min_version))
add_project_arguments(
'-fvisibility=hidden',
'-Wno-unused-parameter',
language: 'c'
)
header_conf = configuration_data()
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
header_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
header_conf.set_quoted('MODULES_VERSION', meson.project_version())
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
header_conf.set_quoted('PURPLE_EVENTS_PLUGIN_ID', 'core-@0@-@1@'.format(package_developer, meson.project_name()))
header_conf.set_quoted('PURPLE_DATADIR', purple.get_variable('datadir'))
header_conf.set('PURPLE_EVENTS_EXPORT', '__attribute__((visibility("default")))')
config_h = configure_file(output: 'config.h', configuration: header_conf)
plugindir = purple.get_variable('plugindir')
install_headers(files(
'include/purple-events.h',
),
subdir: 'purple-events',
)
incdirs = include_directories('include')
purple_events_lib = library('purple-events', config_h, files(
'include/purple-events.h',
'src/lib/utils.c',
),
version: '1.0.0',
dependencies: [ glib, purple ],
include_directories: [ incdirs ],
install: true,
)
purple_events = declare_dependency(link_with: purple_events_lib, include_directories: [ incdirs ])
pkgconfig = import('pkgconfig')
pkgconfig.generate(purple_events_lib,
filebase: meson.project_name(),
name: meson.project_name(),
version: meson.project_version(),
description: 'libpurple events handling plugin and library',
subdirs: 'purple-events',
)
install_data(files(
'vapi/purple-events.deps',
'vapi/purple-events.vapi',
),
install_dir: get_option('datadir') / 'vala' / 'vapi'
)
shared_module('events', config_h, files(
'include/purple-events.h',
'src/plugin/utils.h',
'src/plugin/utils.c',
'src/plugin/ui.h',
'src/plugin/ui.c',
'src/plugin/callbacks.h',
'src/plugin/callbacks.c',
'src/plugin/context.h',
'src/plugin/events.h',
'src/plugin/events.c',
),
name_prefix: 'purple-',
dependencies: [ glib, purple ],
include_directories: [ incdirs ],
install: true,
install_dir: plugindir,
)
shared_module('events-exec', config_h, files(
'include/purple-events.h',
'src/plugin-exec/exec.c',
),
name_prefix: 'purple-',
dependencies: [ glib, purple, purple_events ],
install: true,
install_dir: plugindir,
)
subdir('po')