meson: set _GNU_SOURCE on cygwin
[mesa.git] / meson.build
index 4a2e817f0fa45d53daa58b45d12f6f7966ab80c0..7a7793b9961c0788c7f0c1fec9dd516957208140 100644 (file)
@@ -392,6 +392,8 @@ if with_platform_x11
     endif
     if with_dri_platform == 'drm'
       pre_args += '-DGLX_USE_DRM'
+    elif with_dri_platform == 'windows'
+      pre_args += '-DGLX_USE_WINDOWSGL'
     endif
   endif
 else
@@ -479,7 +481,7 @@ if cc.compiles('int foo(void) { return 0; } int bar(void) __attribute__((alias("
 endif
 
 # TODO: this is very incomplete
-if host_machine.system() == 'linux'
+if ['linux', 'cygwin'].contains(host_machine.system())
   pre_args += '-D_GNU_SOURCE'
 endif