meson: Simplify check for cairo library and headers

This commit is contained in:
Xavier Claessens 2020-06-24 14:11:07 -04:00 committed by Ebrahim Byagowi
parent c4bbe89b53
commit 571365df33
1 changed files with 2 additions and 3 deletions

View File

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