-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathmeson.build
66 lines (55 loc) · 1.51 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
project(
'Setzer',
version: '66',
license: 'GPL-3.0-or-later',
)
python = import('python').find_installation()
python_bin = python.full_path()
# configure folders
prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
pymdir = python.get_install_dir()
resourcesdir = join_paths(datadir, 'Setzer')
localedir = get_option('localedir')
mandir = get_option('mandir')
config = configuration_data()
config.set('setzer_version', meson.project_version())
config.set('localedir_path', join_paths(prefix, localedir))
config.set('resources_path', join_paths(prefix, resourcesdir, 'resources'))
config.set('app_icons_path', join_paths(prefix, datadir, 'icons'))
config.set('python_path', python_bin)
config_dev = config
config_dev.set('localedir_path', '/tmp/usr/share/locale') # this is a workaround
config_dev.set('resources_path', join_paths(meson.source_root(), 'data', 'resources'))
config_dev.set('app_icons_path', join_paths(meson.source_root(), 'data'))
# install translations
subdir('po')
# install python sources
install_subdir(
'setzer',
install_dir: pymdir,
)
# install resources
install_subdir(
join_paths('data', 'resources'),
install_dir: resourcesdir,
)
# install program data
subdir('data')
# install binary
configure_file(
input: 'setzer.in',
output: 'setzer',
configuration: config,
install: true,
install_dir: bindir,
)
# create devel binary
configure_file(
input: 'setzer.in',
output: 'setzer_dev.py',
configuration: config_dev,
)
# run tests
subdir('tests')