[cantarell-fonts: 3/109] Add configurable paths to build system.



commit b13bb8785f1e1e614bbe0390bd0ddf5036275f41
Author: Nikolaus Waxweiler <madigens gmail com>
Date:   Sun Jul 23 22:54:10 2017 +0200

    Add configurable paths to build system.

 meson.build       |   12 ++++++++++--
 meson_options.txt |    6 ++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4274f1a..4a74f4b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,8 +1,16 @@
 project('Cantarell', version : '0.30')
 
 datadir = join_paths(get_option('prefix'), get_option('datadir'))
-fontsdir = join_paths(datadir, 'fonts', 'cantarell')
-fontconfigdir = join_paths(datadir, 'fontconfig', 'conf.avail')
+
+fontsdir = get_option('fontsdir')
+if fontsdir == ''
+  fontsdir = join_paths(datadir, 'fonts', 'cantarell')
+endif
+
+fontconfigdir = get_option('fontconfigdir')
+if fontconfigdir == ''
+  fontconfigdir = join_paths(datadir, 'fontconfig', 'conf.avail')
+endif
 
 python3 = import('python3').find_python()
 fontmake = find_program('fontmake')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..759f2ee
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,6 @@
+option('fontsdir', type : 'string',
+       description : 'The directory the fonts should be copied to.')
+
+option('fontconfigdir', type : 'string',
+       description : 'The directory where the fontconfig configuration files reside')
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]