meson: Try harder to find FreeType on Visual Studio
If we can't find FreeType via pkg-config or CMake, try looking for it manually, before we attempt to build it as a fallback.
This commit is contained in:
parent
4b4d5c295d
commit
733414b286
14
meson.build
14
meson.build
|
@ -74,8 +74,18 @@ check_funcs = [
|
||||||
['roundf'],
|
['roundf'],
|
||||||
]
|
]
|
||||||
|
|
||||||
freetype_dep = dependency('freetype2', required: get_option('freetype'),
|
freetype_dep = dependency('freetype2', required: false)
|
||||||
fallback: ['freetype2', 'freetype_dep'])
|
|
||||||
|
if not freetype_dep.found() and cpp.get_id() == 'msvc'
|
||||||
|
if cpp.has_header('ft2build.h')
|
||||||
|
freetype_dep = cpp.find_library('freetype', required: false)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not freetype_dep.found() and get_option('freetype').enabled()
|
||||||
|
freetype_dep = dependency('freetype2', fallback: ['freetype2', 'freetype_dep'])
|
||||||
|
endif
|
||||||
|
|
||||||
glib_dep = dependency('glib-2.0', required: get_option('glib'),
|
glib_dep = dependency('glib-2.0', required: get_option('glib'),
|
||||||
fallback: ['glib', 'libglib_dep'])
|
fallback: ['glib', 'libglib_dep'])
|
||||||
gobject_dep = dependency('gobject-2.0', required: get_option('gobject'),
|
gobject_dep = dependency('gobject-2.0', required: get_option('gobject'),
|
||||||
|
|
Loading…
Reference in New Issue