[Mesa-dev] [PATCH v4 11/49] meson: Add a platform for windows

Dylan Baker dylan at pnwbakers.com
Wed Aug 22 17:04:34 UTC 2018


This mirrors the haiku build which uses a platform.

v2: - Fix some rebase problems

Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
 meson.build       | 8 ++++++--
 meson_options.txt | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index a5cb5be226c..1af610573d5 100644
--- a/meson.build
+++ b/meson.build
@@ -225,10 +225,12 @@ _platforms = get_option('platforms')
 if _platforms.contains('auto')
   if system_has_kms_drm
     _platforms = ['x11', 'wayland', 'drm', 'surfaceless']
-  elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
+  elif ['darwin', 'cygwin'].contains(host_machine.system())
     _platforms = ['x11', 'surfaceless']
   elif ['haiku'].contains(host_machine.system())
     _platforms = ['haiku']
+  elif host_machine.system() == 'windows'
+    _platforms = ['windows']
   else
     error('Unknown OS. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.')
   endif
@@ -240,6 +242,7 @@ with_platform_wayland = _platforms.contains('wayland')
 with_platform_drm = _platforms.contains('drm')
 with_platform_haiku = _platforms.contains('haiku')
 with_platform_surfaceless = _platforms.contains('surfaceless')
+with_platform_windows = _platforms.contains('windows')
 
 with_platforms = false
 if _platforms.length() != 0 and _platforms != ['']
@@ -375,7 +378,8 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
   error('Vulkan drivers require dri3 for X11 support')
 endif
 if with_dri or with_gallium
-  if with_glx == 'disabled' and not with_egl and not with_platform_haiku
+  if (with_glx == 'disabled' and not with_egl and not with_platform_haiku and
+      not with_platform_windows)
     error('building dri or gallium drivers require at least one window system')
   endif
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 5bb560b61fb..b8df253b323 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -24,6 +24,7 @@ option(
   value : ['auto'],
   choices : [
     '', 'auto', 'x11', 'wayland', 'drm', 'surfaceless', 'haiku', 'android',
+    'windows',
   ],
   description : 'comma separated list of window systems to support. If this is set to auto all platforms applicable to the OS will be enabled.'
 )
-- 
2.18.0



More information about the mesa-dev mailing list