This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmeson.build
56 lines (48 loc) · 1.5 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
project(
'lemoa',
'rust',
version: '0.5.1',
meson_version: '>= 0.59',
license: 'GPL-3.0',
)
gnome = import('gnome')
# application_id can contain the -devel extension
base_id = 'io.github.lemmygtk.lemoa'
version = meson.project_version()
# Required packages
dependency('glib-2.0', version: '>= 2.70')
dependency('gio-2.0', version: '>= 2.70')
dependency('gtk4', version: '>= 4.10.0')
dependency('libadwaita-1', version: '>= 1.2.0')
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)
cargo = find_program('cargo', required: true)
# Various directories needed for building
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()
# Add a version suffix for devel builds
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
if vcs_tag == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
endif
application_id = '@0@.@1@'.format(base_id, profile)
else
profile = ''
version_suffix = ''
application_id = base_id
endif
# Modules that need to be built
subdir('src')
subdir('data')
gnome.post_install(
gtk_update_icon_cache: true,
glib_compile_schemas: true,
update_desktop_database: true,
)