Added workaround for legacy MinGW.

When building on legacy MinGW, WINVER and UNICODE need to be defined
before the inclusion of stddef.h (by glfw3.h), which is itself included
before win32_platform.h.
This commit is contained in:
Camilla Berglund
2013-09-13 12:22:28 +02:00
parent bb5581690d
commit 6770ae0556
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -163,6 +163,13 @@ if (_GLFW_WIN32)
if (GLFW_USE_OPTIMUS_HPG)
set(_GLFW_USE_OPTIMUS_HPG 1)
endif()
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before
# the inclusion of stddef.h (by glfw3.h), which is itself included before
# win32_platform.h. We define them here until a saner solution can be found
# NOTE: MinGW-w64 and Visual C++ do /not/ need this hack.
add_definitions(-DUNICODE)
add_definitions(-DWINVER=0x0501)
endif()
#--------------------------------------------------------------------