forked from bilelmoussaoui/Hardcode-Tray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
71 lines (60 loc) · 2.1 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
project('hardcode-tray',
version: run_command('debian/get-version').stdout().strip(),
meson_version: '>= 0.53.0',
license: 'GPL-3.0',
default_options: ['prefix=/usr']
)
dependency('gobject-introspection-1.0')
dependency('gtk+-3.0')
i18n = import('i18n')
python = import('python')
py_installation = python.find_installation('python3')
if not py_installation.found()
error('No valid Python 3 interpreter found.')
endif
PYTHON_DIR = join_paths(get_option('prefix'), py_installation.get_path('purelib'))
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir'))
# Configuration params
conf = configuration_data()
conf.set('DATA_DIR', DATA_DIR)
conf.set('LOCALE_DIR', LOCALE_DIR)
conf.set('PYTHON_DIR', PYTHON_DIR)
conf.set('PACKAGE', meson.project_name())
conf.set('VERSION', meson.project_version())
subdir('data')
subdir('po')
install_subdir(
'HardcodeTray',
install_dir: PYTHON_DIR
)
configure_file(
input: 'const.py.in',
output: 'const.py',
configuration: conf,
install_dir: join_paths(PYTHON_DIR, 'HardcodeTray')
)
configure_file(
input: meson.project_name() + '.py.in',
output: meson.project_name(),
configuration: conf,
install_dir: join_paths(get_option('prefix'), get_option('bindir'))
)
summary({'Project Name': meson.project_name(),
'Build Version': meson.project_version()})
summary({'Build Machine OS': build_machine.system(),
'Build Machine CPU': build_machine.cpu(),
'Build Machine Endianness': build_machine.endian()},
section: 'Compilation Environment')
if meson.is_cross_build()
summary({'Host Machine OS': host_machine.system(),
'Host Machine CPU': host_machine.cpu(),
'Host Machine Endianness': host_machine.endian()},
section: 'Cross-Compilation Target')
endif
summary({'Source Directory': meson.current_source_dir(),
'Build Directory': meson.current_build_dir(),
'bindir': get_option('bindir'),
'libdir': get_option('libdir'),
'datadir': get_option('datadir')},
section: 'Directories')