forked from mufeedali/Wordbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
65 lines (54 loc) · 1.85 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
project(
'wordbook',
version: '0.4.0',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
],
)
i18n = import('i18n')
gnome = import('gnome')
python = import('python')
base_id = 'dev.mufeed.Wordbook'
message('Looking for dependencies')
py_installation = python.find_installation('python3')
if not py_installation.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
dependency('gobject-introspection-1.0', version: '>= 1.35.0')
dependency('gtk4', version: '>= 4.6')
dependency('libadwaita-1', version: '>=1.0')
dependency('glib-2.0')
dependency('pygobject-3.0', version: '>= 3.29.1')
glib_compile_resources = find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstreamcli = find_program('appstreamcli', required: false)
version = meson.project_version()
version_array = version.split('.')
major_version = version_array[0].to_int()
minor_version = version_array[1].to_int()
version_micro = version_array[2].to_int()
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
localedir = prefix / get_option('localedir')
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
profile = get_option('profile')
moduledir = join_paths(pkgdatadir, meson.project_name())
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
application_id = '@0@.@1@'.format(base_id, profile)
else
profile = ''
application_id = base_id
endif
subdir('data')
subdir('wordbook')
subdir('po')
gnome.post_install(
gtk_update_icon_cache: true,
glib_compile_schemas: true,
update_desktop_database: true,
)