Commit 0f0543fd authored by Jose Fonseca's avatar Jose Fonseca

Portability build fixes for MinGW.

parent a46710f3
......@@ -18,6 +18,11 @@ IF (C_COMPILER_FLAG_WALL)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
ENDIF (C_COMPILER_FLAG_WALL)
if (WIN32)
# MSVC & MinGW only define & use APIENTRY
add_definitions (-DGLAPIENTRY=__stdcall)
endif (WIN32)
if (APPLE)
find_path(GLEXT_INCLUDE_DIR
NAMES OpenGL/glext.h
......
......@@ -38,6 +38,10 @@
extern "C" {
#endif
#ifdef WIN32
#include <windows.h>
#endif
#ifdef USE_OPENGL
# include "glew.h"
/* Include the real headers too, in case GLEW misses something. */
......
......@@ -38,6 +38,10 @@
extern "C" {
#endif
#ifdef WIN32
#include <windows.h>
#endif
#ifdef USE_GLUT
# ifdef __APPLE__
# include <GLUT/glut.h>
......
......@@ -29,7 +29,7 @@
#include "piglit-util.h"
#include "piglit-framework.h"
#if defined(_MSC_VER)
#if defined(WIN32)
#undef near
#undef far
#endif
......
if (MSVC)
if (WIN32)
add_definitions ( -D__WIN__ -D__MS__ )
ELSEIF (APPLE)
add_definitions ( -D__AGL__ -D__UNIX__ )
......
......@@ -31,6 +31,10 @@
* with point sprites enabled.
*/
#if defined(WIN32)
#include <windows.h>
#endif
#include <assert.h>
#include <string.h>
#include <stdio.h>
......
......@@ -29,7 +29,7 @@
#include "piglit-util.h"
#include "piglit-framework.h"
#if defined(_MSC_VER)
#if defined(WIN32)
#undef near
#undef far
#endif
......
......@@ -21,7 +21,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(_MSC_VER)
#if defined(WIN32)
#include <windows.h>
#endif
......
......@@ -21,7 +21,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(_MSC_VER)
#if defined(WIN32)
#include <windows.h>
#endif
......
......@@ -21,7 +21,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if defined(_MSC_VER)
#if defined(WIN32)
#include <windows.h>
#endif
......
......@@ -25,9 +25,11 @@
#include "config.h"
#if defined(_MSC_VER)
#if defined(WIN32)
#include <windows.h>
#endif
#if defined(_MSC_VER)
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment