gstgl: Porting fixes for MSVC with Meson
authorNirbheek Chauhan <nirbheek@centricular.com>
Thu, 27 Oct 2016 02:00:19 +0000 (07:30 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:23 +0000 (19:32 +0000)
GL/gl.h needs windows.h on MSVC

WINAPI should not be used with MSVC. It also causes a build error.

gst-libs/gst/gl/gstglapi.h

index 93b60b7..43e6d4a 100644 (file)
@@ -62,6 +62,9 @@
 #   include <OpenGL/gl3.h>
 #  endif
 # else
+#  if defined(_MSC_VER)
+#   include <windows.h>
+#  endif
 #  include <GL/gl.h>
 #  if defined(__WIN32__) || defined(_WIN32)
 #   include <GL/glext.h>
@@ -73,7 +76,7 @@
 #pragma GCC diagnostic pop
 #endif
 
-#ifdef WINAPI
+#if defined(WINAPI) && !defined(_MSC_VER)
 #define GSTGLAPI WINAPI
 #else
 #define GSTGLAPI