-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
75 lines (64 loc) · 1.88 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
project(
'ibus-mcbopomofo', 'vala',
version: '0.0.1')
engine_name = 'ibus-engine-mcbopomofo'
gettext_domain = 'ibus-mcbopomofo'
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name().to_lower()
libexecdir = prefix / get_option('libexecdir')
localedir = prefix / get_option('localedir')
configurations = configuration_data({
'ENGINE_NAME': engine_name,
'PACKAGE_DATADIR': pkgdatadir,
'PACKAGE_NAME': meson.project_name().to_lower(),
'PACKAGE_VERSION': meson.project_version(),
'BINDIR': bindir,
'DATADIR': datadir,
'PKGDATADIR': pkgdatadir,
'LIBEXECDIR': libexecdir,
'GETTEXT_PACKAGE': gettext_domain,
'LOCALEDIR': localedir,
})
add_project_arguments(['-DGETTEXT_PACKAGE="@0@"'.format(gettext_domain)], language: 'c')
library_path_base = get_option('mcbopomofo_path')
if library_path_base == ''
library_path_base = join_paths(meson.source_root(), 'mcbopomofo-core/build')
endif
cc = meson.get_compiler('c')
valac = meson.get_compiler('vala')
ibus_dep = dependency('ibus-1.0', version: '>= 1.5.4')
dependencies = [
valac.find_library('posix'),
dependency('glib-2.0'),
dependency('gobject-2.0'),
dependency('gio-2.0'),
ibus_dep,
cc.find_library('m', required: false),
cc.find_library('stdc++'),
cc.find_library('McBopomofoCore',
dirs: [
library_path_base / 'src'
]),
]
subdir('data')
subdir('po')
subdir('src')
summary({
'prefix': prefix,
'datadir': datadir,
'pkgdatadir': pkgdatadir,
'libexecdir': libexecdir,
'localedir': localedir,
'McBopomofoCore path base': library_path_base,
},
section: 'Directories')
summary({
'Engine name': engine_name,
'IBus supports focus ID': ibus_supports_focus_id,
'Debug': get_option('debug'),
'Optimization': get_option('optimization'),
},
section: 'Build',
bool_yn: true)