meson: Simplify check for freetype2 library and headers

This commit is contained in:
Xavier Claessens 2020-06-24 13:40:32 -04:00 committed by Ebrahim Byagowi
parent 40ec187dec
commit 33252ce576
1 changed files with 2 additions and 3 deletions

View File

@ -72,9 +72,8 @@ if not get_option('freetype').disabled()
freetype_dep = dependency('freetype2', required: false) freetype_dep = dependency('freetype2', required: false)
if not freetype_dep.found() and cpp.get_id() == 'msvc' if not freetype_dep.found() and cpp.get_id() == 'msvc'
if cpp.has_header('ft2build.h') freetype_dep = cpp.find_library('freetype', required: false,
freetype_dep = cpp.find_library('freetype', required: false) has_headers: ['ft2build.h'], )
endif
endif endif
if not freetype_dep.found() and get_option('freetype').enabled() if not freetype_dep.found() and get_option('freetype').enabled()