-
Notifications
You must be signed in to change notification settings - Fork 44
/
meson.build
109 lines (85 loc) · 3.01 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
project(
'vala-panel-appmenu',
'vala',
'c',
version : '24.02',
meson_version : '>=0.51.0',
license : 'LGPL-3.0-or-later',
default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=1']
)
am_cflags = [
'-fstack-protector',
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
]
add_project_arguments(am_cflags, language: 'c')
vapi_dir = join_paths(meson.current_source_dir(), 'vapi')
add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
##################
# Module imports #
##################
gnome = import('gnome')
i18n = import('i18n')
###############
# Directories #
###############
prefix = get_option('prefix')
datadir = get_option('datadir')
localedir = get_option('localedir')
schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
################
# Dependencies #
################
glib_ver = '>=2.52.0'
giounix = dependency('gio-unix-2.0', version: glib_ver)
gdkpixbuf = dependency('gdk-pixbuf-2.0', required: false)
gtk_ver = '>=3.22.0'
gtk = dependency('gtk+-3.0', version: gtk_ver)
backend_opt = get_option('wm_backend')
backend_wnck = false
wnck_ver = '>=3.4.8'
wnck = dependency('libwnck-3.0', version: wnck_ver, required: backend_opt == 'wnck')
if(wnck.found() and (backend_opt == 'wnck' or backend_opt == 'auto'))
backend_wnck = true
endif
if(not (backend_wnck))
error('No backend available (libwnck3 required)')
endif
vp_ver = '>=24.03'
vp = dependency('vala-panel', version: vp_ver, required: get_option('valapanel'))
vala_panel_found = vp.found()
mp_ver = '>=1.20'
mp = dependency('libmatepanelapplet-4.0', version: mp_ver, required: get_option('mate'))
mate_found = mp.found()
xp = dependency('libxfce4panel-2.0', required: get_option('xfce'))
xc = dependency('libxfconf-0', required: get_option('xfce'))
xfce_found = xp.found() and xc.found()
bp = dependency('budgie-1.0', required: get_option('budgie'))
budgie_found = bp.found()
#################
# Configuration #
#################
conf_data = configuration_data()
conf_data.set('GETTEXT_PACKAGE', meson.project_name())
conf_data.set('LOCALE_DIR', join_paths(prefix,localedir))
conf_data.set('CMAKE_INSTALL_PREFIX', prefix)
config = configure_file(input : join_paths('vapi','config.vala.in'),
output : 'config.vala',
configuration : conf_data)
desktop_kwargs = {
'type': 'desktop',
'args' : ['--keyword=Name','--keyword=Description','--keyword=Comment', '--keyword=Help'],
'po_dir': join_paths(meson.current_source_dir(),'po'),
'install': true,
}
#################
# Subprojects #
#################
subproject('registrar', required: get_option('registrar'))
subproject('jayatana', required: get_option('jayatana'))
subproject('appmenu-gtk-module', required: get_option('appmenu-gtk-module'))
subdir('lib')
subdir('applets')
subdir('data')
subdir('po')
install_data('README.md', install_dir : join_paths(get_option('datadir'), 'doc', meson.project_name()))
install_data('LICENSE', install_dir : join_paths(get_option('datadir'), 'licenses', meson.project_name()))