aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2020-01-16 21:11:54 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2020-01-16 21:11:54 +0100
commit1a685c8d8939d7054456324dd9fa818ac7d3a25c (patch)
treebf2a4bcae1f7e7140abc97fc24187ba3fa62a8f0
parenta7c62174f60f993faab7ac8dfa3f034ad10c0557 (diff)
downloadd2tk-1a685c8d8939d7054456324dd9fa818ac7d3a25c.tar.xz
meson: add optional dependency on fontconfig.
-rw-r--r--VERSION2
-rw-r--r--d2tk/config.h.in1
-rw-r--r--meson.build67
-rw-r--r--ttf/FiraMono-Bold.ttfbin206548 -> 0 bytes
4 files changed, 37 insertions, 33 deletions
diff --git a/VERSION b/VERSION
index b1f4994..ca8c6b9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.959
+0.1.961
diff --git a/d2tk/config.h.in b/d2tk/config.h.in
index 45c087a..a5f504d 100644
--- a/d2tk/config.h.in
+++ b/d2tk/config.h.in
@@ -1,2 +1,3 @@
#define D2TK_PTY @D2TK_PTY@
#define D2TK_EVDEV @D2TK_EVDEV@
+#define D2TK_FONTCONFIG @D2TK_FONTCONFIG@
diff --git a/meson.build b/meson.build
index 764516a..22eefd5 100644
--- a/meson.build
+++ b/meson.build
@@ -38,6 +38,8 @@ glew_dep = dependency('glew', version : '>=2.1.0',
static : static_link, required : false)
vterm_dep = dependency('vterm', version : '>=0.1',
static : static_link, required : false)
+fontconfig_dep = dependency('fontconfig', version : '>=2.0.0',
+ static : static_link, required : false)
if not glew_dep.found()
# use embedded glew
@@ -46,7 +48,7 @@ if not glew_dep.found()
sources : join_paths('glew-2.1.0', 'glew.c'))
endif
-deps = [m_dep, evdev_dep, vterm_dep]
+deps = [m_dep, evdev_dep, vterm_dep, fontconfig_dep]
links = []
pugl_inc = include_directories('pugl')
@@ -105,6 +107,11 @@ else
conf_data.set('D2TK_EVDEV', 0)
endif
+if fontconfig_dep.found()
+ conf_data.set('D2TK_FONTCONFIG', 1)
+else
+ conf_data.set('D2TK_FONTCONFIG', 0)
+endif
bin_srcs = [
join_paths('example', 'example.c')
@@ -224,41 +231,37 @@ configure_file(
configuration : conf_data,
install : false)
-configure_file(
- input : join_paths('ttf', 'FiraSans-Bold.ttf'),
- output : 'FiraSans-Bold.ttf',
- copy : true,
- install : false)
-
-configure_file(
- input : join_paths('ttf', 'FiraMono-Bold.ttf'),
- output : 'FiraMono-Bold.ttf',
- copy : true,
- install : false)
+if not fontconfig_dep.found()
+ configure_file(
+ input : join_paths('ttf', 'FiraSans-Bold.ttf'),
+ output : 'FiraSans-Bold.ttf',
+ copy : true,
+ install : false)
-configure_file(
- input : join_paths('ttf', 'FiraCode-Bold.ttf'),
- output : 'FiraCode-Bold.ttf',
- copy : true,
- install : false)
+ configure_file(
+ input : join_paths('ttf', 'FiraCode-Bold.ttf'),
+ output : 'FiraCode-Bold.ttf',
+ copy : true,
+ install : false)
-configure_file(
- input : join_paths('ttf', 'FiraCode-Light.ttf'),
- output : 'FiraCode-Light.ttf',
- copy : true,
- install : false)
+ configure_file(
+ input : join_paths('ttf', 'FiraCode-Light.ttf'),
+ output : 'FiraCode-Light.ttf',
+ copy : true,
+ install : false)
-configure_file(
- input : join_paths('ttf', 'FiraCode-Medium.ttf'),
- output : 'FiraCode-Medium.ttf',
- copy : true,
- install : false)
+ configure_file(
+ input : join_paths('ttf', 'FiraCode-Medium.ttf'),
+ output : 'FiraCode-Medium.ttf',
+ copy : true,
+ install : false)
-configure_file(
- input : join_paths('ttf', 'FiraCode-Regular.ttf'),
- output : 'FiraCode-Regular.ttf',
- copy : true,
- install : false)
+ configure_file(
+ input : join_paths('ttf', 'FiraCode-Regular.ttf'),
+ output : 'FiraCode-Regular.ttf',
+ copy : true,
+ install : false)
+endif
configure_file(
input : join_paths('example', 'libre-arrow-circle-right.png'),
diff --git a/ttf/FiraMono-Bold.ttf b/ttf/FiraMono-Bold.ttf
deleted file mode 100644
index 6d4ffb0..0000000
--- a/ttf/FiraMono-Bold.ttf
+++ /dev/null
Binary files differ