summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-04-18 13:17:20 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-17 11:06:01 -0700
commitbd3b3c44a410225e1daa6bc76601cdfe1be18484 (patch)
tree7b46319b3b513f55e4aed906d5d4b77844361eb2
parent59eb7d727631659a5c8250361ae66957926f0a53 (diff)
meson: Add a platform for windows
This mirrors the haiku build which uses a platform.
-rw-r--r--meson.build10
-rw-r--r--meson_options.txt1
2 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 1d262fbc0e..1f6e1a77b8 100644
--- a/meson.build
+++ b/meson.build
@@ -250,6 +250,8 @@ else
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
@@ -259,10 +261,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
@@ -274,6 +278,7 @@ if _platforms != ['']
with_platform_drm = _platforms.contains('drm')
with_platform_haiku = _platforms.contains('haiku')
with_platform_surfaceless = _platforms.contains('surfaceless')
+ with_platform_windows = _platforms.contains('windows')
egl_native_platform = _platforms[0]
endif
@@ -394,7 +399,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 2c1f514deb..5d3805e877 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.'
)