forked from Lafydev/wingpanel-indicator-ayatana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
81 lines (64 loc) · 2.66 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
# ----------------------------------------------------------------------------------------------------------------------
# Project: wingpanel-indicator-ayatana
#
# A Wingpanel indicator plug-in that adds ayatana indicator support.
# ----------------------------------------------------------------------------------------------------------------------
project('wingpanel-indicator-ayatana', 'vala', 'c')
sources = [
'src/AyatanaIndicator.vala',
'src/Indicator.vala',
'src/IndicatorButton.vala',
'src/IndicatorFactory.vala',
'src/IndicatorIface.vala',
'src/IndicatorLoader.vala',
'src/IndicatorObject.vala',
'src/SubMenuButton.vala',
]
wingpanel= dependency('wingpanel-2.0',required : false)
if not wingpanel.found()
wingpanel = dependency('wingpanel',required : true)
endif
dependencies = {
'granite': dependency('granite'),
'indicator3': dependency('indicator3-0.4'),
'wingpanel': wingpanel
}
indicator_name = 'ayatana'
indicator_dir = join_paths(get_option('prefix'), 'lib/wingpanel')
# ----------------------------------------------------------------------------------------------------------------------
# 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
)