[Mesa-dev] [PATCH 10/48] meson: Add a platform for windows
Dylan Baker
dylan at pnwbakers.com
Mon Jun 11 22:55:37 UTC 2018
This mirrors the haiku build which uses a platform.
---
meson.build | 16 ++++++++++++++--
meson_options.txt | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 634a7a21758..9c8b9ca9ba5 100644
--- a/meson.build
+++ b/meson.build
@@ -222,14 +222,24 @@ else
with_dri_platform = 'none'
endif
+with_platform_android = false
+with_platform_haiku = false
+with_platform_windows = false
+with_platform_wayland = false
+with_platform_x11 = false
+with_platform_drm = false
+with_platform_surfaceless = false
+egl_native_platform = ''
_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
@@ -241,6 +251,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 != ['']
@@ -365,7 +376,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 28e92509198..ad06916fc40 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.17.1
More information about the mesa-dev
mailing list