-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
62 lines (54 loc) · 1.83 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
project ('polvora', ['vala', 'c'],
version: '1.0',
license: 'GPLv3+',
default_options: [
'warning_level=1',
'buildtype=debugoptimized',
],
meson_version: '>= 0.37.1'
)
# Minimum version of Vala
vala_version_required = '0.40.0'
vala = meson.get_compiler('vala')
if not vala.version().version_compare('>= @0@'.format(vala_version_required))
error('valac >= @0@ required!'.format(vala_version_required))
endif
# Imports
gnome = import ('gnome')
i18n = import ('i18n')
# Add our config VAPI
add_project_arguments(
[
'--vapidir', join_paths(meson.source_root(), 'src'),
'--pkg', 'config',
],
language: 'vala'
)
# Paths
config_h_dir = include_directories('.')
locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
datadir = join_paths (get_option ('prefix'), get_option ('datadir'))
icondir = join_paths (datadir, 'polvora', 'icons')
po_dir = join_paths(meson.source_root(), 'po')
# Dependencies
glib_min_version = '2.56.0'
glib_dep = dependency ('glib-2.0', version: '>= ' + glib_min_version)
gio_dep = dependency ('gio-2.0', version: '>= ' + glib_min_version)
gobject_dep = dependency ('gobject-2.0', version: '>= ' + glib_min_version)
gthread_dep = dependency ('gthread-2.0', version: '>= ' + glib_min_version)
gtk_dep = dependency ('gtk+-3.0', version: '>=3.10.8')
sqlite_dep = dependency ('sqlite3', version: '>=3.7.4')
# Configuration
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('LOCALE_DIR', locale_dir)
conf.set_quoted('NAME', 'pólvora')
conf.set_quoted('VERSION', meson.project_version())
configure_file(output: 'config.h', configuration: conf)
# Post-install scripts
meson.add_install_script('meson_post_install.py')
# Subfolders
subdir ('data')
subdir ('help')
subdir ('po')
subdir ('src')