[gtk] build: Add a sassc feature
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] build: Add a sassc feature
- Date: Sat, 9 Jan 2021 06:48:55 +0000 (UTC)
commit 2b6b35d91fb2a367d2e39a7b7b36d08c604c6195
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 9 01:28:11 2021 -0500
build: Add a sassc feature
Add an option to disable css rebuilds. This allows
to build GTK from release tarballs (Which are including
the css) without a sassc dependency.
gtk/meson.build | 22 +++++++++++++---------
meson_options.txt | 7 ++++++-
2 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 9f07d3d5f0..f1fd696297 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -838,20 +838,24 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
# Build the theme files
sassc = find_program('sassc', required: false)
-if not sassc.found()
+if not sassc.found() and not get_option('sassc').disabled()
subproject('sassc')
- sassc = find_program('sassc', required: true)
+ sassc = find_program('sassc', required: get_option('sassc').enabled())
endif
-sassc_opts = [ '-a', '-M', '-t', 'compact' ]
+if sassc.found()
+ sassc_opts = [ '-a', '-M', '-t', 'compact' ]
-subdir('theme/Adwaita')
-subdir('theme/HighContrast')
+ subdir('theme/Adwaita')
+ subdir('theme/HighContrast')
-theme_deps = [
- adwaita_theme_deps,
- hc_theme_deps,
-]
+ theme_deps = [
+ adwaita_theme_deps,
+ hc_theme_deps,
+ ]
+else
+ theme_deps = []
+endif
gtkresources = gnome.compile_resources('gtkresources',
gtk_gresources_xml,
diff --git a/meson_options.txt b/meson_options.txt
index 24a61511d7..71b01ec5c8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -78,9 +78,14 @@ option('tracker',
option('colord',
type: 'feature',
- value : 'disabled',
+ value: 'disabled',
description : 'Build colord support for the CUPS printing backend')
+option('sassc',
+ type: 'feature',
+ value: 'auto',
+ description: 'Rebuild themes using sassc')
+
# Documentation and introspection
option('gtk_doc',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]