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
|
project('gnome-extensions-tool', 'c',
version: '43.9',
meson_version: '>= 0.58.0',
license: 'GPLv2+'
)
gio_req = '>= 2.56.0'
fs = import('fs')
gnome = import('gnome')
i18n = import('i18n')
if meson.is_subproject()
package_name = get_option('package_name')
assert(package_name != '',
'package_name must be specified for subproject builds')
else
package_name = meson.project_name()
endif
package_version = meson.project_version()
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(datadir, 'locale')
gio_dep = dependency('gio-2.0', version: gio_req)
gio_unix_dep = dependency('gio-unix-2.0', version: gio_req)
autoar_dep = dependency('gnome-autoar-0')
json_dep = dependency('json-glib-1.0')
cc = meson.get_compiler('c')
bash_completion = dependency('bash-completion', required: get_option('bash_completion'))
po_dir = meson.global_source_root() + '/po'
subdir('src')
if bash_completion.found()
install_data('completion/bash/gnome-extensions',
install_dir: bash_completion.get_variable('completionsdir', pkgconfig_define: ['datadir', datadir])
)
endif
if get_option('man')
if fs.exists('man/gnome-extensions.1')
install_man('man/gnome-extensions.1')
else
a2x = find_program('a2x')
subdir('man')
endif
endif
if not meson.is_subproject()
subdir('po')
summary_dirs = {
'prefix': get_option('prefix'),
'bindir': get_option('bindir'),
'datadir': get_option('datadir'),
}
if get_option('man')
summary_dirs += { 'mandir': get_option('mandir') }
endif
summary_build = {
'buildtype': get_option('buildtype'),
'debug': get_option('debug'),
}
summary_options = {
'man': get_option('man'),
'bash_completion': bash_completion.found(),
}
summary(summary_dirs, section: 'Directories')
summary(summary_build, section: 'Build Configuration')
summary(summary_options, section: 'Build Options')
endif
|