@@ -69,6 +69,27 @@ endif
config.set10('HAVE_LIBDRM_ATOMIC_PRIMITIVES', intel_atomics)
config.set10('HAVE_LIB_ATOMIC_OPS', lib_atomics)
+foreach d : [
+]
+ driver = d[0]
+ require_atomics = d[1]
+ default = d[2]
+ _option = get_option(driver)
+
+ if _option == 'auto'
+ if with_atomics or not require_atomics
+ set_variable('with_' + driver, default)
+ else
+ set_variable('with_' + driver, false)
+ endif
+ else
+ if _option == 'true' and require_atomics and not with_atomics
+ error('libdrm_' + driver + ' requires atomics.')
+ endif
+ set_variable('with_' + driver, _option == 'true')
+ endif
+endforeach
+
with_intel = false
_intel = get_option('intel')
if _intel == 'auto'
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> --- meson.build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)