-
-
Notifications
You must be signed in to change notification settings - Fork 202
/
meson.build
72 lines (60 loc) · 2.15 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
# project name and programming language
project('com.github.akiraux.akira', 'vala', 'c',
default_options: 'default_library=static')
akira_prefix = get_option('prefix')
akira_datadir = join_paths(akira_prefix, get_option('datadir'))
akira_pkgdatadir = join_paths(akira_datadir, meson.project_name())
install_tests = get_option('install-tests')
source_root = meson.current_source_dir()
vapi_dir = join_paths(source_root, 'vapi')
add_project_arguments('--vapidir=' + vapi_dir, language: 'vala')
# Include the translations module
i18n = import('i18n')
# Dependencies
gtk_dependency = dependency('gtk+-3.0')
granite_dependency = dependency('granite', version: '>= 6.0.0')
gee_dependency = dependency('gee-0.8')
libxml_dependency = dependency('libxml-2.0')
cairo_dependency = dependency('cairo', version: '>=1.14')
libarchive_dependency = dependency('libarchive')
json_glib_dependency = dependency('json-glib-1.0')
# Optional dependencies
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
# Include the gnome module
gnome = import('gnome')
asresources = gnome.compile_resources(
'as-resources', 'data/assets.gresource.xml',
source_dir: 'data',
c_name: 'as'
)
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required: true)
vala_lint = find_program('io.elementary.vala-lint', required : false)
if vala_lint.found()
test (
'Vala lint',
vala_lint,
args: ['-d', join_paths(meson.source_root(), 'src')]
)
endif
# Set up the profile
profile = get_option('profile')
if profile == 'development'
application_id = meson.project_name() + 'Devel'
schema_path = '/com/github/akiraux/akiraDevel/'
else
application_id = meson.project_name()
schema_path = '/com/github/akiraux/akira/'
endif
gettext_package = application_id
# Set our translation domain
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (gettext_package), language:'c')
add_global_arguments(['-DG_LOG_DOMAIN="Akira"'], language:'c')
subdir('src')
subdir('data')
subdir('po')
if install_tests
subdir('tests')
endif
meson.add_install_script('aux/meson/post_install.py')