diff --git a/meson.build b/meson.build index 9cfb2be17..59d05266d 100644 --- a/meson.build +++ b/meson.build @@ -72,9 +72,8 @@ if not get_option('freetype').disabled() freetype_dep = dependency('freetype2', required: false) 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 + freetype_dep = cpp.find_library('freetype', required: false, + has_headers: ['ft2build.h'], ) endif if not freetype_dep.found() and get_option('freetype').enabled()