meson: Clean up FreeType2 dependency search
Since we are using Meson 0.60.x now, make use of CMake's support for finding FreeType in addition to pkg-config, which actually looks for FreeType2 via looking at the headers and .lib's internally, so we don't have to reinvent the wheel. Sadly, we don't have similar support for Cairo and HarfBuzz in CMake, so we have to stick with what we have now, since we still need to support older HarfBuzz and Cairo versions as we are in a stable release series.
This commit is contained in:
parent
f2bbaf4f32
commit
d819af3dbd
22
meson.build
22
meson.build
@ -416,25 +416,9 @@ if pangoft_dep.found()
|
|||||||
# We get the dependency itself from pango, but pango doesn't care
|
# We get the dependency itself from pango, but pango doesn't care
|
||||||
# about ft2 version, so an extra check is needed.
|
# about ft2 version, so an extra check is needed.
|
||||||
|
|
||||||
# Update once Meson can have deps declared in a declarative manner
|
ft2_dep = dependency(['freetype2','FreeType'],
|
||||||
ft2_dep = dependency('freetype2', version: '>= 2.7.1', required: false)
|
version: '>= 2.7.1',
|
||||||
|
fallback : ['freetype2', 'freetype_dep'])
|
||||||
if not ft2_dep.found() and cc.get_id() == 'msvc'
|
|
||||||
if cc.has_header('ft2build.h') and cc.has_header('freetype/ftmm.h')
|
|
||||||
ft_lib = cc.find_library('freetype', required: false)
|
|
||||||
if ft_lib.found()
|
|
||||||
if cc.has_function('FT_Get_Var_Design_Coordinates', dependencies: ft_lib,
|
|
||||||
prefix: '''#include <ft2build.h>
|
|
||||||
#include FT_MULTIPLE_MASTERS_H''')
|
|
||||||
ft2_dep = ft_lib
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not ft2_dep.found()
|
|
||||||
ft2_dep = dependency('freetype2', version: '>= 2.7.1', fallback : ['freetype2', 'freetype_dep'])
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if win32_enabled
|
if win32_enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user