-
Notifications
You must be signed in to change notification settings - Fork 13
/
meson.build
95 lines (76 loc) · 2.79 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# SPDX-FileCopyrightText: 2016 Florian Müllner <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-or-later
project(
'polari',
'c',
version: '46.0',
meson_version: '>= 1.1.0',
license: 'GPL-2.0-or-later',
)
app_id = 'org.gnome.Polari'
gnome = import('gnome')
i18n = import('i18n')
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
pkglibdir = join_paths(libdir, meson.project_name())
pkgdatadir = join_paths(datadir, meson.project_name())
desktopdir = join_paths(datadir, 'applications')
icondir = join_paths(datadir, 'icons')
metainfodir = join_paths(datadir, 'metainfo')
schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
servicedir = join_paths(datadir, 'dbus-1', 'services')
tpclientdir = join_paths(datadir, 'telepathy', 'clients')
girdir = join_paths(pkgdatadir, 'gir-1.0')
typelibdir = join_paths(pkglibdir, 'girepository-1.0')
desktop_file_validate = find_program('desktop-file-validate', required: false)
json_glib_validate = find_program('json-glib-validate', required: false)
appstreamcli = find_program('appstreamcli', required: false)
check_version = find_program('meson/check-version.py')
gio = dependency('gio-2.0', version: '>= 2.43.4')
telepathy_glib = dependency('telepathy-glib')
tracker = dependency('tracker-sparql-3.0')
girepository = dependency('gobject-introspection-1.0')
gjs = dependency('gjs-1.0', version: '>= 1.73.1')
conf = configuration_data()
conf.set_quoted('PKGLIBDIR', pkglibdir)
cc = meson.get_compiler('c')
gjs_has_autocleanup = cc.compiles(
'''
#include <gjs/gjs.h>
void main(void) { g_autoptr(GjsContext) context = NULL; }
''',
dependencies: [gjs],
)
conf.set('HAVE_STRCASESTR', cc.has_function('strcasestr'))
conf.set('SNAPSHOT', get_option('snapshot'))
conf.set('GJS_HAS_AUTOCLEANUP', gjs_has_autocleanup)
config_h = declare_dependency(
sources: configure_file(configuration: conf, output: 'config.h'),
include_directories: include_directories('.'),
)
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
subdir('data')
subdir('src')
subdir('po')
subdir('help')
meson.add_dist_script(check_version, meson.project_version(), 'NEWS')
meson.add_dist_script(
check_version,
meson.project_version(),
'--type', 'metainfo',
'data/metainfo/org.gnome.Polari.metainfo.xml.in',
)
summary('prefix', get_option('prefix'))
summary('bindir', get_option('bindir'))
summary('libdir', get_option('libdir'))
summary('datadir', get_option('datadir'))
summary('buildtype', get_option('buildtype'), section: 'Build Configuration')
summary('snapshot', get_option('snapshot'), section: 'Build Configuration')
summary('debug', get_option('debug'), section: 'Build Configuration')