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



commit ab7883fdf9adf861ab64082c2e24e1375db6c01a
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 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


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