fontconfig: Branch 'master'

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

 



 meson.build |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit e50fbc1beb1da8a503939e75ccdf0b18a0848785
Author: Chun-wei Fan <fanchunwei@xxxxxxxxxxxxx>
Date:   Tue Sep 29 13:50:38 2020 +0800

    meson: Look for FreeType using CMake too
    
    Some systems build FreeType using CMake rather than autotools (such as Visual
    Studio), which will give us CMake config files rather than pkg-config files, so
    if we can't find FreeType using pkg-config, try again using CMake.
    
    Please note that according to FreeType's docs/VERSIONS.TXT, the version we want
    when checking with CMake is 2.8.1 or later.

diff --git a/meson.build b/meson.build
index 12509aa..273d976 100644
--- a/meson.build
+++ b/meson.build
@@ -20,14 +20,22 @@ defversion = '@0@.@1@'.format(curversion, fc_version_micro)
 osxversion = curversion + 1
 
 freetype_req = '>= 21.0.15'
+freetype_req_cmake = '>= 2.8.1'
 
-freetype_dep = dependency('freetype2', version: freetype_req,
-  fallback: ['freetype2', 'freetype_dep'])
+cc = meson.get_compiler('c')
+
+
+freetype_dep = dependency('freetype2', method: 'pkg-config', version: freetype_req, required: false)
+
+# Give another shot using CMake
+if not freetype_dep.found()
+  freetype_dep = dependency('freetype', method: 'cmake', version: freetype_req_cmake,
+    fallback: ['freetype2', 'freetype_dep'])
+endif
 
 expat_dep = dependency('expat',
   fallback: ['expat', 'expat_dep'])
 
-cc = meson.get_compiler('c')
 i18n = import('i18n')
 pkgmod = import('pkgconfig')
 python3 = import('python').find_installation()
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux