summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-01-15 14:38:23 +0800
committerAaron Boxer <boxerab@gmail.com>2020-06-08 08:31:54 -0400
commit94ac19e4dc9ce6b8e93abc28087620019c6080e7 (patch)
tree20ab3f8e6bce2640776762086a47dfcfb51e5f7d
parenta47f958ce1b7e1fedb58ae270ad8244a6623ece1 (diff)
downloadpango-94ac19e4dc9ce6b8e93abc28087620019c6080e7.tar.gz
meson: Only use FreeType fallback only when needed
Defer using the FreeType fallback until: -We need to really build FontConfig support -FreeType is not found even after checking the headers and lib's.
-rw-r--r--meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index a0d2ecc4..fa98dabb 100644
--- a/meson.build
+++ b/meson.build
@@ -312,8 +312,7 @@ message('fontconfig has FcWeightFromOpenTypeDouble: ' + res)
# The first version of freetype with a pkg-config file is 2.1.5
# We require both fontconfig and freetype if we are to have either.
-freetype_dep = dependency('freetype2', required: false,
- fallback: ['freetype2', 'freetype_dep'])
+freetype_dep = dependency('freetype2', required: false)
if freetype_dep.found()
freetype2_pc = 'freetype2'
@@ -330,6 +329,11 @@ else
endif
endif
+if fontconfig_required and not freetype_dep.found()
+ freetype_dep = dependency('freetype2', required: false,
+ fallback: ['freetype2', 'freetype_dep'])
+endif
+
# To build pangoft2, we need HarfBuzz, FontConfig and FreeType
build_pangoft2 = harfbuzz_dep.found() and fontconfig_dep.found() and freetype_dep.found()
if build_pangoft2