-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
64 lines (51 loc) · 1.48 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
project('force-quit-dialog-extension',
version: '43.0',
meson_version: '>= 0.50.0'
)
sources = ['extension.js']
extra_sources = ['COPYING']
uuid = '[email protected]'
datadir = get_option('datadir')
extensiondir = join_paths(datadir, 'gnome-shell', 'extensions')
installdir = join_paths(extensiondir, uuid)
metaconf = configuration_data()
metaconf.set('uuid', uuid)
meta = [
configure_file(
input: 'metadata.json.in',
output: 'metadata.json',
configuration: metaconf
)
]
install_subdir('schemas', install_dir: installdir)
install_data(sources + extra_sources + meta, install_dir: installdir)
sassc = find_program('sassc', required: true)
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
styles = custom_target(
'styles',
input: 'stylesheet.scss',
output: 'stylesheet.css',
command: [ sassc, sassc_opts, '@INPUT@', '@OUTPUT@' ],
depend_files: 'stylesheet.scss',
install: true,
install_dir: installdir,
build_by_default: true)
extension_tool = find_program('gnome-extensions', required: false)
if extension_tool.found()
builddir = meson.current_build_dir()
srcdir = meson.current_source_dir()
command = [
extension_tool,
'pack',
'--force',
'--out-dir=@0@'.format(builddir),
'--extra-source=@0@/metadata.json'.format(builddir)
]
foreach s : extra_sources
command += '--extra-source=@0@'.format(s)
endforeach
command += srcdir
run_target('zip-file', command: command)
endif
i18n = import('i18n')
subdir('po')