-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
81 lines (68 loc) · 2.27 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
# project name and programming language
project('com.github.lozanotux.calculadorita', 'vala', 'c')
# Needed for libmatheval VAPI files
# for more information refer to: https://wiki.gnome.org/Projects/Vala/Bindings
add_project_arguments(
['--vapidir', join_paths(meson.current_source_dir(), 'vapi')],
language: 'vala'
)
# Include the translations module
i18n = import('i18n')
# Set our translation domain
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
# Load CSS file
gnome = import('gnome')
# Tell meson where to find our resources file and to compile it as a GResource
gresource = gnome.compile_resources(
'gresource',
'data' / 'css.gresource.xml',
source_dir: 'data'
)
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
gresource,
'src' / 'App.vala',
'src' / 'Constants.vala',
'src' / 'utils' / 'Engine.vala',
'src' / 'widgets' / 'MainWindow.vala',
dependencies: [
dependency('gtk4'),
dependency('libmatheval')
],
install: true
)
#Translate and install our .desktop file
i18n.merge_file(
input: 'data' / 'calculadorita.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: meson.source_root() / 'po',
type: 'desktop',
install: true,
install_dir: get_option('datadir') / 'applications'
)
#Translate and install our .metainfo file
i18n.merge_file(
input: 'data' / 'calculadorita.metainfo.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: meson.source_root() / 'po',
install: true,
install_dir: get_option('datadir') / 'metainfo'
)
subdir('po')
# Install our icons in all the required sizes
icon_sizes = ['16', '24', '32', '48', '64', '128']
foreach i : icon_sizes
install_data(
'data' / 'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps',
rename: meson.project_name() + '.svg'
)
install_data(
'data' / 'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps',
rename: meson.project_name() + '.svg'
)
endforeach
gnome.post_install(glib_compile_schemas: true)
subdir('data')