Mesa (staging/18.2): meson: Don't allow building EGL on Windows or MacOS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 11 08:26:13 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: 26d6c57dc2021f7697ea6c6ff1bb555675ff1bf2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=26d6c57dc2021f7697ea6c6ff1bb555675ff1bf2

Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Oct  1 12:40:34 2018 -0700

meson: Don't allow building EGL on Windows or MacOS

Currently mesa only supports EGL on Unix like systems, cygwin, and
haiku. Meson should actually enforce this. This fixes the default build
on MacOS.

v2: - invert the condition, mark darwin and windows as not supported
      instead of trying to mark what is supported.
v3: - add missing )
v3: - Update comment to reflect condition change in v2

CC: 18.2 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
(cherry picked from commit b8521704ed2f5e84f0599a040c015ef02890468d)

---

 meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index af77b3b894..f272b34490 100644
--- a/meson.build
+++ b/meson.build
@@ -297,7 +297,10 @@ endif
 
 _egl = get_option('egl')
 if _egl == 'auto'
-  with_egl = with_dri and with_shared_glapi and with_platforms
+  with_egl = (
+    not ['darwin', 'windows'].contains(host_machine.system()) and
+    with_dri and with_shared_glapi and with_platforms
+  )
 elif _egl == 'true'
   if not with_dri
     error('EGL requires dri')
@@ -307,6 +310,8 @@ elif _egl == 'true'
     error('No platforms specified, consider -Dplatforms=drm,x11 at least')
   elif not ['disabled', 'dri'].contains(with_glx)
     error('EGL requires dri, but a GLX is being built without dri')
+  elif ['darwin', 'windows'].contains(host_machine.system())
+    error('EGL is not available on Windows or MacOS')
   endif
   with_egl = true
 else




More information about the mesa-commit mailing list