forked from UbuntuBudgie/budgie-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
242 lines (191 loc) · 6.5 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
project('budgie-extras',
['vala', 'c'],
version: '1.6.0',
meson_version: '>= 0.40.0'
)
i18n = import('i18n')
message('Looking for dependencies')
vala_version_required = '0.40.0'
vala = meson.get_compiler('vala')
VAPI_DIR = join_paths(meson.source_root(),
'vapi')
add_project_arguments(
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
language: 'c'
)
am_cflags = []
add_global_arguments(am_cflags, language: 'c')
# Global path variable
intltool = find_program('intltool-merge')
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = get_option('libexecdir')
datadir = join_paths(prefix, get_option('datadir'))
bindir = get_option('bindir')
sysconfdir = get_option('sysconfdir')
add_project_arguments(
'-DPKGDATADIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'), 'wingpanel')),
language: 'c'
)
podir = join_paths(meson.source_root(), 'po')
LOCALE_DIR = join_paths(prefix, get_option('localedir'))
PLUGINS_INSTALL_DIR = join_paths(libdir, 'budgie-desktop',
'plugins')
PIXMAPS_DIR = join_paths(datadir, 'pixmaps')
PLUGINS_DATA_DIR = join_paths(datadir, 'budgie-desktop',
'plugins')
APPLICATIONS_DIR = join_paths(datadir, 'applications')
NEWS = meson.source_root() + '/NEWS'
# Global configuration data - matches vapi/config.vapi strings
conf = configuration_data()
conf.set('PACKAGE_NAME', 'budgie-extras')
conf.set_quoted('PACKAGE_LOCALEDIR', LOCALE_DIR)
conf.set_quoted('PACKAGE_LIBDIR', libdir)
if libexecdir == 'libexec'
libexecdir = join_paths(prefix, libexecdir)
endif
conf.set_quoted('PACKAGE_LIBEXECDIR', libexecdir)
if bindir == 'bin'
bindir = join_paths(prefix, bindir)
endif
conf.set_quoted('PACKAGE_BINDIR', bindir)
conf.set_quoted('PACKAGE_SHAREDIR', datadir)
SHUFFLER = 'budgie-window-shuffler'
conf.set_quoted('SHUFFLER_DIR', join_paths(libdir, SHUFFLER))
PREVIEWS = 'budgie-previews'
conf.set_quoted('PREVIEWS_DIR', join_paths(libdir, PREVIEWS))
WSWITCHER = 'budgie-wswitcher'
conf.set_quoted('WSWITCHER_DIR', join_paths(PLUGINS_INSTALL_DIR, WSWITCHER))
with_stateless = get_option('with-stateless')
if with_stateless == true
warning('Only use stateless option with a supported OS like Solus')
endif
xdg_appdir = get_option('xdg-appdir')
if xdg_appdir == ''
if with_stateless == true
xdg_appdir = join_paths(datadir, 'xdg', 'autostart')
else
xdg_appdir = join_paths(get_option('sysconfdir'), 'xdg', 'autostart')
endif
endif
config_h = configure_file(
output: 'config.h',
configuration: conf
)
config_dep = declare_dependency(
dependencies: vala.find_library('config', dirs: VAPI_DIR),
sources: config_h
)
config_inc_dir = include_directories('.')
# Now lets install applets
message('Installing applets...')
build_all = get_option('build-all')
subdir('po')
build_applications_menu = get_option('build-applications-menu')
if build_all == true or build_applications_menu == true
subdir('budgie-applications-menu')
endif
build_wswitcher = get_option('build-wswitcher')
if build_all == true or build_wswitcher == true
subdir('budgie-wswitcher')
endif
build_hotcorners = get_option('build-hotcorners')
if build_all == true or build_hotcorners == true
subdir('budgie-hotcorners')
endif
build_wpreviews = get_option('build-wpreviews')
if build_all == true or build_wpreviews == true
subdir('budgie-wpreviews')
endif
build_quicknote = get_option('build-quicknote')
if build_all == true or build_quicknote == true
subdir('budgie-quicknote')
endif
build_showtime = get_option('build-showtime')
if build_all == true or build_showtime == true
subdir('budgie-showtime')
endif
build_countdown = get_option('build-countdown')
if build_all == true or build_countdown == true
subdir('budgie-countdown')
endif
build_clockworks = get_option('build-clockworks')
if build_all == true or build_clockworks == true
subdir('budgie-clockworks')
endif
build_keyboard_autoswitch = get_option('build-keyboard-autoswitch')
if build_all == true or build_keyboard_autoswitch == true
subdir('budgie-keyboard-autoswitch')
endif
build_rotation_lock = get_option('build-rotation-lock')
if build_all == true or build_rotation_lock == true
subdir('budgie-rotation-lock')
endif
build_dropby = get_option('build-dropby')
if build_all == true or build_dropby == true
subdir('budgie-dropby')
endif
build_kangaroo = get_option('build-kangaroo')
if build_all == true or build_kangaroo == true
subdir('budgie-kangaroo')
endif
build_weathershow = get_option('build-weathershow')
if build_all == true or build_weathershow == true
subdir('budgie-weathershow')
endif
build_trash = get_option('build-trash')
if build_all == true or build_trash == true
subdir('budgie-trash')
endif
build_app_launcher = get_option('build-app-launcher')
if build_all == true or build_app_launcher == true
subdir('budgie-app-launcher')
endif
build_recentlyused = get_option('build-recentlyused')
if build_all == true or build_recentlyused == true
subdir('budgie-recentlyused')
endif
build_takeabreak = get_option('build-takeabreak')
if build_all == true or build_takeabreak == true
subdir('budgie-takeabreak')
endif
build_extrasdaemon = get_option('build-extrasdaemon')
if build_all == true or build_extrasdaemon == true
subdir('budgie-extras-daemon')
endif
build_workspacestopwatch = get_option('build-workspacestopwatch')
if build_all == true or build_workspacestopwatch == true
subdir('budgie-workspace-stopwatch')
endif
build_quickchar = get_option('build-quickchar')
if build_all == true or build_quickchar == true
subdir('budgie-quickchar')
endif
build_fuzzyclock = get_option('build-fuzzyclock')
if build_all == true or build_fuzzyclock == true
subdir('budgie-fuzzyclock')
endif
build_brightness_controller = get_option('build-brightness-controller')
if build_all == true or build_brightness_controller == true
subdir('budgie-brightness-controller')
endif
build_visualspace = get_option('build-visualspace')
if build_all == true or build_visualspace == true
subdir('budgie-visualspace')
endif
build_wallstreet = get_option('build-wallstreet')
if build_all == true or build_wallstreet == true
subdir('budgie-wallstreet')
endif
build_network_manager = get_option('build-network-manager')
if build_all == true or build_network_manager == true
subdir('budgie-network-manager')
endif
build_window_shuffler = get_option('build-window-shuffler')
if build_all == true or build_window_shuffler == true
subdir('budgie-window-shuffler')
endif
with_default_schema = get_option('with-default-schema')
if build_all == true and with_default_schema == true
subdir('default-schema')
endif