Browse Source

Fix UNICODE define in SDL not taking effect properly with new MinGW.

Lasse Öörni 12 years ago
parent
commit
8d5aa5bbd2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Source/ThirdParty/SDL/CMakeLists.txt

+ 5 - 0
Source/ThirdParty/SDL/CMakeLists.txt

@@ -10,6 +10,11 @@ file (GLOB C_FILES
 
 if (WIN32)
     CHECK_INCLUDE_FILES (wbemcli.h HAVE_WBEMCLI_H)
+    # New MinGW versions may evaluate whether to use A or W postfix on functions before SDL gets to define UNICODE on its own,
+    # so make sure it is already defined
+    if (MINGW)
+        add_definitions (-DUNICODE=1)
+    endif ()
     if (HAVE_WBEMCLI_H)
         add_definitions (-DSDL_JOYSTICK_DINPUT)
         add_definitions (-DSDL_HAPTIC_DINPUT)