1project('find library and headers', 'c') 2 3cc = meson.get_compiler('c') 4 5if not cc.find_library('z', required : false).found() 6 error('MESON_SKIP_TEST: zlib not found.') 7endif 8 9lib = cc.find_library('z', 10 has_headers : 'foo.h', 11 required : false) 12assert(not lib.found(), 'Header should be missing') 13 14lib = cc.find_library('z', 15 has_headers : 'foo.h', 16 header_include_directories : include_directories('.')) 17assert(lib.found(), 'Header should be found') 18 19lib = cc.find_library('z', 20 has_headers : ['foo.h', 'bar.h'], 21 header_include_directories : include_directories('.'), 22 required : false) 23assert(not lib.found(), 'One header should be missing') 24