-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
72 lines (47 loc) · 1.66 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
project('pigeon', ['c', 'vala'],
version: '0.1.0',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2' ]
)
app_id_prefix = 'app.drey.Pigeon'
resource_path_prefix = '/app/drey/Pigeon'
app_id_suffix = ''
resource_path_suffix = ''
app_is_development = false
# check the profile for this build
if get_option('profile') == 'development'
add_project_arguments('-D', 'DEVEL', language: 'vala')
app_id_suffix = '.Devel'
resource_path_suffix = '/Devel'
app_is_development = true
endif
app_id = app_id_prefix + app_id_suffix
resource_path = resource_path_prefix + resource_path_suffix
add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), language: 'c')
i18n = import('i18n')
gnome = import('gnome')
# config variables
config_data = configuration_data()
# project version
config_data.set('VERSION', meson.project_version())
# application ID
config_data.set('APP_ID', app_id)
config_data.set('APP_ID_PREFIX', app_id_prefix)
config_data.set('APP_ID_SUFFIX', app_id_suffix)
# application resource path
config_data.set('RESOURCE_PATH', resource_path)
config_data.set('RESOURCE_PATH_PREFIX', resource_path_prefix)
config_data.set('RESOURCE_PATH_SUFFIX', resource_path_suffix)
# GNU GetText package name
config_data.set('GETTEXT_PACKAGE', meson.project_name())
# data directory paths
config_data.set('LOCALE_DIR', join_paths(get_option('prefix'), get_option('localedir')))
config_data.set('DATA_DIR', join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()))
subdir('data')
subdir('src')
subdir('po')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)