meson: Add a platform for windows
authorDylan Baker <dylan@pnwbakers.com>
Wed, 18 Apr 2018 20:17:20 +0000 (13:17 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 10 Sep 2019 20:36:47 +0000 (20:36 +0000)
This mirrors the haiku build which uses a platform.

v2: - Fix some rebase problems

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
meson.build
meson_options.txt

index c700d64eb970e4684bf2b1f5cba8a9183d5535b1..1ab21dfc2f50986bfc9745c9f8d60375f2daedd0 100644 (file)
@@ -277,10 +277,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 @0@. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.'.format(
           host_machine.system()))
@@ -293,6 +295,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 != ['']
index aadf7fd0721b4ee4aeec6bb31c21ad5a534d5184..a2f86be19ae72b0d75d95c59b2c150c9e5400f18 100644 (file)
@@ -24,6 +24,7 @@ option(
   value : ['auto'],
   choices : [
     '', 'auto', 'x11', 'wayland', 'drm', 'surfaceless', 'haiku', 'android',
+    'windows',
   ],
   description : 'window systems to support. If this is set to `auto`, all platforms applicable will be enabled.'
 )