-
Notifications
You must be signed in to change notification settings - Fork 7
/
meson.build
59 lines (51 loc) · 1.76 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
# project name and programming language
project('com.github.artemanufrij.hashit', 'vala', 'c')
# Include the translations module
i18n = import('i18n')
# Set our translation domain
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
'src/Application.vala',
'src/MainWindow.vala',
'src/Settings.vala',
dependencies: [
dependency('gtk+-3.0'),
dependency('granite'),
],
install: true
)
#Translate and install our .desktop file
i18n.merge_file(
input: join_paths('data', meson.project_name() + '.desktop.in'),
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
#Translate and install our .appdata file
i18n.merge_file(
input: join_paths('data', meson.project_name() + '.appdata.xml.in'),
output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
#Install our .contract file so Files will see it
install_data(
join_paths('data', meson.project_name() + '.contract'),
install_dir: join_paths(get_option('datadir'), 'contractor')
)
#Install icons
icon_sizes = ['32', '48', '64']
foreach i : icon_sizes
install_data(
join_paths('data', 'icons', i, meson.project_name() + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps')
)
endforeach
subdir('po')
subdir('schemas')
meson.add_install_script('meson/post_install.py')