[Orxonox-commit 5017] r9683 - in code/trunk/src: . external/enet

landauf at orxonox.net landauf at orxonox.net
Wed Oct 2 23:38:01 CEST 2013


Author: landauf
Date: 2013-10-02 23:38:00 +0200 (Wed, 02 Oct 2013)
New Revision: 9683

Modified:
   code/trunk/src/SourceConfig.cmake
   code/trunk/src/external/enet/win32.c
Log:
mingw with gcc 4.8 has its own version of sdkddkver.h which apparently requires different defines. it looks like those different defines work for all versions of mingw. we use now normal defines for msvc and different defines for mingw.
removed define from win32.c since it's already defined by a compiler flag

Modified: code/trunk/src/SourceConfig.cmake
===================================================================
--- code/trunk/src/SourceConfig.cmake	2013-10-02 21:31:02 UTC (rev 9682)
+++ code/trunk/src/SourceConfig.cmake	2013-10-02 21:38:00 UTC (rev 9683)
@@ -44,10 +44,17 @@
 
   # Target Windows XP as minimum Windows version
   # And try to catch all the different macro defines for that...
-  ADD_COMPILER_FLAGS("-D_WIN32_WINNT=0x0501")
-  ADD_COMPILER_FLAGS("-D_WIN32_WINDOWS=0x0501")
-  ADD_COMPILER_FLAGS("-DWINVER=0x0501")
-  ADD_COMPILER_FLAGS("-DNTDDI_VERSION=0x05010000")
+  IF(MINGW)
+    ADD_COMPILER_FLAGS("-D_WIN32_WINNT=0x05010000")
+    ADD_COMPILER_FLAGS("-D_WIN32_WINDOWS=0x05010000")
+    ADD_COMPILER_FLAGS("-DWINVER=0x05010000")
+    ADD_COMPILER_FLAGS("-DNTDDI_VERSION=0x05010000")
+  ELSE()
+    ADD_COMPILER_FLAGS("-D_WIN32_WINNT=0x0501")
+    ADD_COMPILER_FLAGS("-D_WIN32_WINDOWS=0x0501")
+    ADD_COMPILER_FLAGS("-DWINVER=0x0501")
+    ADD_COMPILER_FLAGS("-DNTDDI_VERSION=0x05010000")
+  ENDIF()
 ENDIF(WIN32)
 
 # Visual Leak Dectector configuration

Modified: code/trunk/src/external/enet/win32.c
===================================================================
--- code/trunk/src/external/enet/win32.c	2013-10-02 21:31:02 UTC (rev 9682)
+++ code/trunk/src/external/enet/win32.c	2013-10-02 21:38:00 UTC (rev 9683)
@@ -4,8 +4,6 @@
 */
 #ifdef WIN32
 
-#define _WIN32_WINNT 0x0501
-
 #include <time.h>
 #define ENET_BUILDING_LIB 1
 #include "enet/enet.h"




More information about the Orxonox-commit mailing list