-
Notifications
You must be signed in to change notification settings - Fork 5
/
meson.build
92 lines (72 loc) · 1.69 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Project
#
project(
'Caffeine',
'c',
version: '1.0.6',
license: 'MIT',
meson_version: '>= 1.3'
)
base_id = 'com.konstantintutsch.Caffeine'
conf = configuration_data()
profile = ''
id_suffix = ''
version_suffix = ''
if get_option('profile') == 'development'
profile = 'devel'
id_suffix = '.Devel'
version_suffix = '-devel'
endif
project_name = meson.project_name()
project_id = base_id + id_suffix
project_root = '/' + project_id.replace('.', '/')
project_version = meson.project_version()
project_build = meson.project_version() + version_suffix
project_exec = project_id
conf.set('project_name', project_name)
conf.set('project_id', project_id)
conf.set('project_root', project_root)
conf.set('project_version', project_version)
conf.set('project_build', project_build)
conf.set('project_exec', project_exec)
#
# Paths
#
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
localedir = prefix / get_option('localedir')
conf.set('bindir', bindir)
conf.set('datadir', datadir)
conf.set('localedir', localedir)
#
# Specific
#
gettext_package = project_id
gresource_file = datadir / project_id + '.gresource'
ui_resource = project_root / 'ui'
conf.set('gettext_package', gettext_package)
conf.set('gresource_file', gresource_file)
conf.set('ui_resource', ui_resource)
#
# External
#
i18n = import('i18n')
gnome = import('gnome')
gtk_dep = dependency('gtk4')
adwaita_dep = dependency('libadwaita-1', version: '>=1.4')
#
# Subdirectories
#
internal_inc = include_directories('.')
subdir('po')
subdir('data')
subdir('src')
#
# GNOME
#
gnome.post_install(
gtk_update_icon_cache: true,
update_desktop_database: true
)