On Tue, 15 Nov 2022 at 11:00, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Tue, 15 Nov 2022 at 09:25, Michael Tokarev <m...@tls.msk.ru> wrote: > > > > 14.11.2022 14:59, Peter Maydell wrote: > > .. > > > We can do something like > > > > > > config_host_data.set('HAVE_CAPSTONE_CAPSTONE_H', > > > cc.has_header('capstone/capstone.h', depedencies: [capstone]) > > > > This doesn't work, because has_header does not have "dependencies" > > argument. > > That's odd, the Meson documentation says it does: > > https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerhas_header > > "dependencies dep | list[dep] > Additionally dependencies required for compiling and / or linking." > and it's not marked with a "since version xxx" tag...
...and we already have a few lines in meson.build that use it: if cc.has_header('epoxy/egl.h', dependencies: epoxy) if nettle.found() and not cc.has_header('nettle/xts.h', dependencies: nettle) -- PMM