diff mbox

[libdrm,08/23] meson: fix tegra=auto detection (was always false)

Message ID 20180320174659.1510-9-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom March 20, 2018, 5:46 p.m. UTC
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 meson.build | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/meson.build b/meson.build
index 76eefaeca20ad80ba1ef..a5b71c5e8fb55600458e 100644
--- a/meson.build
+++ b/meson.build
@@ -151,11 +151,13 @@  endif
 
 with_tegra = false
 _tegra = get_option('tegra')
-if _tegra == 'true'
-  if not with_atomics
-    error('libdrm_tegra requires atomics.')
-  endif
-  with_tegra = true
+if _tegra == 'auto'
+  with_tegra = with_atomics
+else
+  with_tegra = _tegra == 'true'
+endif
+if with_tegra and not with_atomics
+  error('libdrm_tegra requires atomics.')
 endif
 
 with_etnaviv = false