mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-27 00:51:55 +00:00
added MINGW support
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@34 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
30a00a5788
commit
46bfdc60f6
@ -97,36 +97,43 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* GLEW does not include <windows.h> to avoid name space pollution.
|
* GLEW does not include <windows.h> to avoid name space pollution.
|
||||||
* GL needs APIENTRY and WINGDIAPI, GLU needs CALLBACK and wchar_t
|
* GL needs APIENTRY, GLU needs CALLBACK, wchar_t, and GL_API
|
||||||
* defined properly.
|
* defined properly.
|
||||||
*/
|
*/
|
||||||
/* <windef.h> */
|
/* <windef.h> */
|
||||||
#ifndef APIENTRY
|
#ifndef APIENTRY
|
||||||
#define GLEW_APIENTRY_DEFINED
|
#define GLEW_APIENTRY_DEFINED
|
||||||
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
#define APIENTRY __stdcall
|
# define APIENTRY __attribute__ ((__stdcall__))
|
||||||
#else
|
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
||||||
#define APIENTRY
|
# define APIENTRY __stdcall
|
||||||
#endif
|
# else
|
||||||
|
# define APIENTRY
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/* <winnt.h> */
|
/* <winnt.h> */
|
||||||
#ifndef CALLBACK
|
#ifndef CALLBACK
|
||||||
#if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
#define GLEW_CALLBACK_DEFINED
|
||||||
#define CALLBACK __stdcall
|
# if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
#else
|
# define CALLBACK __attribute__ ((__stdcall__))
|
||||||
#define CALLBACK
|
# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||||
#endif
|
# define CALLBACK __stdcall
|
||||||
|
# else
|
||||||
|
# define CALLBACK
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/* <wingdi.h> and <winnt.h> */
|
/* <wingdi.h> and <winnt.h> */
|
||||||
#ifndef WINGDIAPI
|
//#ifndef WINGDIAPI
|
||||||
#define GLEW_WINGDIAPI_DEFINED
|
//#define GLEW_WINGDIAPI_DEFINED
|
||||||
#define WINGDIAPI __declspec(dllimport)
|
//#define WINGDIAPI __declspec(dllimport)
|
||||||
#endif
|
//#endif
|
||||||
/* <ctype.h> */
|
/* <ctype.h> */
|
||||||
#ifndef _WCHAR_T_DEFINED
|
#ifndef _WCHAR_T_DEFINED
|
||||||
typedef unsigned short wchar_t;
|
typedef unsigned short wchar_t;
|
||||||
#define _WCHAR_T_DEFINED
|
#define _WCHAR_T_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
/* <glu.h> */
|
||||||
|
#define GLAPI extern
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLEW_STATIC needs to be set when including the
|
* GLEW_STATIC needs to be set when including the
|
||||||
@ -145,6 +152,7 @@ typedef unsigned short wchar_t;
|
|||||||
|
|
||||||
#else /* _UNIX */
|
#else /* _UNIX */
|
||||||
|
|
||||||
|
#define GLEW_APIENTRY_DEFINED
|
||||||
#define APIENTRY
|
#define APIENTRY
|
||||||
#define GLAPI extern
|
#define GLAPI extern
|
||||||
#define GLAPIENTRY
|
#define GLAPIENTRY
|
||||||
@ -4590,11 +4598,16 @@ extern GLEW_EXPORT const char* glewGetErrorString (GLint error);
|
|||||||
#undef APIENTRY
|
#undef APIENTRY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLEW_WINGDIAPI_DEFINED
|
#ifdef GLEW_CALLBACK_DEFINED
|
||||||
#undef GLEW_WINGDIAPI_DEFINED
|
#undef GLEW_CALLBACK_DEFINED
|
||||||
#undef WINGDIAPI
|
#undef CALLBACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//#ifdef GLEW_WINGDIAPI_DEFINED
|
||||||
|
//#undef GLEW_WINGDIAPI_DEFINED
|
||||||
|
//#undef WINGDIAPI
|
||||||
|
//#endif
|
||||||
|
|
||||||
#undef GLEW_EXPORT
|
#undef GLEW_EXPORT
|
||||||
|
|
||||||
#endif /* __glew_h__ */
|
#endif /* __glew_h__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user