forked from MvBonin/wingpanel-community-indicators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
86 lines (68 loc) · 2.88 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
# ----------------------------------------------------------------------------------------------------------------------
# Project: wingpanel-indicator-ayatana
#
# A Wingpanel indicator plug-in that adds ayatana indicator support.
# ----------------------------------------------------------------------------------------------------------------------
project('wingpanel-indicator-ayatana', 'vala', 'c')
sources = [
'src/Indicator.vala',
'src/MetaIndicator.vala',
'src/NamarupaMetaIndicator.vala',
'src/IndicatorButton.vala',
'src/IndicatorFactory.vala',
'src/IndicatorIface.vala',
'src/IndicatorLoader.vala',
'src/IndicatorObject.vala',
'src/SubMenuButton.vala',
'src/Settings.vala',
]
wingpanel= dependency('wingpanel-2.0',required : false)
if not wingpanel.found()
wingpanel = dependency('wingpanel',required : true)
endif
dependencies = {
'json': dependency('json-glib-1.0'),
'granite': dependency('granite'),
'indicator3': dependency('indicator3-0.4'),
'wingpanel': wingpanel
}
libdir = join_paths(get_option('prefix'), get_option('libdir'))
indicator_name = 'ayatana'
indicator_dir = dependencies['wingpanel'].get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir])
# ----------------------------------------------------------------------------------------------------------------------
# Bindings:
add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')],
language: 'vala')
# ----------------------------------------------------------------------------------------------------------------------
# Internationalization:
i18n = import('i18n')
gettext_name = indicator_name + '-indicator'
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(gettext_name),
language: 'c')
# ----------------------------------------------------------------------------------------------------------------------
# Generated constants:
constants = configuration_data()
constants.set_quoted('WINGPANEL_INDICATOR_DIR', join_paths(get_option('prefix'), indicator_dir))
constants.set_quoted('AYATANA_INDICATOR_DIR', dependencies['indicator3'].get_pkgconfig_variable('indicatordir'))
constants.set_quoted('INDICATOR_NAME', indicator_name)
constants.set_quoted('DATA_DIR', join_paths(get_option('prefix'), get_option('datadir')))
constants.set_quoted('GETTEXT_PACKAGE', gettext_name)
constants_file = configure_file(
input: 'src/Constants.vala',
output: 'Constants.vala',
configuration: constants
)
# ----------------------------------------------------------------------------------------------------------------------
# Build:
deps = []
foreach _,v : dependencies
deps += v
endforeach
shared_module(
indicator_name,
sources,
constants_file,
dependencies: deps,
install: true,
install_dir: indicator_dir
)