meson.build
ASCII text
1
project(
2
'materia-theme',
3
version: '20200916',
4
license: 'GPLv2+',
5
meson_version: '>= 0.47.0',
6
default_options: ['prefix=/usr'],
7
)
8
9
theme_base_name = get_option('theme_name')
10
theme_base_dir = join_paths(get_option('datadir'), 'themes', theme_base_name)
11
12
sassc = find_program('sassc')
13
sassc_opts = ['-M', '-t', 'expanded']
14
15
sh = find_program('sh')
16
17
themes = []
18
foreach color: get_option('colors')
19
foreach size: get_option('sizes')
20
if color == 'default'
21
color_suffix = ''
22
scss_dark_theme = 'false'
23
scss_light_topbar = 'false'
24
elif color == 'light'
25
color_suffix = '-light'
26
scss_dark_theme = 'false'
27
scss_light_topbar = 'true'
28
elif color == 'dark'
29
color_suffix = '-dark'
30
scss_dark_theme = 'true'
31
scss_light_topbar = 'false'
32
endif
33
34
if size == 'default'
35
size_suffix = ''
36
scss_compact = 'false'
37
elif size == 'compact'
38
size_suffix = '-compact'
39
scss_compact = 'true'
40
endif
41
42
themes += {
43
'name': theme_base_name + color_suffix + size_suffix,
44
'dir': theme_base_dir + color_suffix + size_suffix,
45
'color': color_suffix,
46
'size': size_suffix,
47
'scss_dark_theme': scss_dark_theme,
48
'scss_light_topbar': scss_light_topbar,
49
'scss_compact': scss_compact,
50
}
51
endforeach
52
endforeach
53
54
foreach theme: themes
55
install_data(
56
'COPYING',
57
install_dir: theme['dir'],
58
)
59
endforeach
60
61
if not get_option('flatpak')
62
subdir('src')
63
else
64
subdir('src/gtk-3.0')
65
subdir('src/gtk-4.0')
66
endif
67