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