meson: fix intel requirements

Intel requires libpciaccess and an x86/x86_64 host, so if those
aren't found and it's enabled we need to error

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
main
Dylan Baker 2023-09-01 12:09:24 -07:00 committed by Simon Ser
parent 8d8357dc64
commit a6a2ccb448
1 changed files with 6 additions and 2 deletions

View File

@ -87,8 +87,12 @@ dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : get_opti
with_intel = false with_intel = false
_intel = get_option('intel') _intel = get_option('intel')
if not _intel.disabled() if not _intel.disabled()
if _intel.enabled() and not with_atomics if _intel.enabled()
error('libdrm_intel requires atomics.') if not with_atomics
error('libdrm_intel requires atomics.')
elif not dep_pciaccess.found()
error('libdrm_intel requires libpciaccess')
endif
else else
with_intel = (_intel.enabled() or host_machine.cpu_family().startswith('x86')) and with_atomics and dep_pciaccess.found() with_intel = (_intel.enabled() or host_machine.cpu_family().startswith('x86')) and with_atomics and dep_pciaccess.found()
endif endif