-
Notifications
You must be signed in to change notification settings - Fork 164
/
meson.build
73 lines (59 loc) · 1.98 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
project('gtg',
version: '0.7-dev',
meson_version: '>= 0.51.0'
)
i18n = import('i18n')
gnome = import('gnome')
pymod = import('python')
python3 = pymod.find_installation('python3')
if not python3.found()
error('python3 installation not found')
endif
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
appdatadir = datadir / 'metainfo'
desktopdir = datadir / 'applications'
dbusservicedir = datadir / 'dbus-1' / 'services'
icondir = datadir / 'icons'
pythondir = python3.get_path('purelib')
rdnn_name = 'org.gnome.GTG'
application_id = rdnn_name
if get_option('profile') == 'development' or get_option('profile') == 'flatpak_snapshot'
application_id = rdnn_name + '.Devel'
endif
bin_config = configuration_data()
bin_config.set('local_build', 'False')
bin_config.set('pythondir', pythondir)
bin_config.set('localedir', datadir / 'locale')
bin_config.set('APP_ID', application_id)
bin_config.set('bindir', bindir)
local_config = configuration_data()
local_config.set('local_build', 'True')
local_config.set('pythondir', meson.source_root())
local_config.set('localedir', meson.source_root() / 'po')
local_config.set('APP_ID', application_id)
# Wrapper to launch gtg with non-/usr prefix install PYTHONPATH
wrapper_config = configuration_data()
wrapper_config.set('python_installdir', python3.get_install_dir(pure: true))
configure_file(
input: 'prefix-gtg.sh.in',
output: 'prefix-gtg.sh',
configuration: wrapper_config,
)
dep_gtk4 = dependency('gtk4', version: '>= 4.10')
# Check for some runtime dependencies so they are displayed with an "NO"
# when building which could give the user an idea what could be missing.
dep_glib = dependency('glib-2.0', required: false)
dep_libsecret = dependency('libsecret-1', required: false)
dep_gtksourceview = dependency('gtksourceview-4', required: false)
test(
'pytest',
python3,
args : ['-m', 'pytest', 'tests'],
workdir : meson.source_root()
)
subdir('GTG')
subdir('data')
subdir('po')
subdir('docs')