diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-01-15 14:38:23 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-05 17:58:36 +0800 |
commit | 10307fd448d0260c0b15a417fd63a437e9607a35 (patch) | |
tree | 20ab3f8e6bce2640776762086a47dfcfb51e5f7d /meson.build | |
parent | e48ae523d07168718815148aafca7ceec05ecff5 (diff) | |
download | pango-10307fd448d0260c0b15a417fd63a437e9607a35.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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
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 |