[pango/msvc.improvements: 8/10] meson: Only use FreeType fallback only when needed



commit 5445843d6eb93e20a1f5e8f9a6b8f6220bb5b80f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jan 15 14:38:23 2020 +0800

    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.

 meson.build | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index d4cff2af..d5321e60 100644
--- a/meson.build
+++ b/meson.build
@@ -310,8 +310,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'
@@ -328,6 +327,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


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