[Orxonox-commit 3614] r8299 - code/branches/kicklib2/src

rgrieder at orxonox.net rgrieder at orxonox.net
Fri Apr 22 18:26:47 CEST 2011


Author: rgrieder
Date: 2011-04-22 18:26:47 +0200 (Fri, 22 Apr 2011)
New Revision: 8299

Modified:
   code/branches/kicklib2/src/CMakeLists.txt
Log:
Define minimum Windows version we build Orxonox for. That also defines the Windows API we can use so that we certainly don't make use of any newer API functions when building on a newer Windows version than it is targeted for.

Definition: We support any Windows version from XP on (without the service packs).

Modified: code/branches/kicklib2/src/CMakeLists.txt
===================================================================
--- code/branches/kicklib2/src/CMakeLists.txt	2011-04-22 16:23:45 UTC (rev 8298)
+++ code/branches/kicklib2/src/CMakeLists.txt	2011-04-22 16:26:47 UTC (rev 8299)
@@ -36,15 +36,24 @@
 ADD_COMPILER_FLAGS("-DBOOST_ALL_NO_LIB")
 ADD_COMPILER_FLAGS("-DPOCO_NO_AUTOMATIC_LIBS")
 
-# If no defines are specified, these libs get linked statically
-ADD_COMPILER_FLAGS("-DBOOST_ALL_DYN_LINK" WIN32 LINK_BOOST_DYNAMIC)
-#ADD_COMPILER_FLAGS("-DENET_DLL"           WIN32 LINK_ENET_DYNAMIC)
-ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   WIN32 LINK_LUA5.1_DYNAMIC)
-# If no defines are specified, these libs get linked dynamically
-ADD_COMPILER_FLAGS("-DCEGUI_STATIC -DTOLUA_STATIC" WIN32 NOT LINK_CEGUI_DYNAMIC)
-ADD_COMPILER_FLAGS("-DOGRE_STATIC_LIB"    WIN32 NOT LINK_OGRE_DYNAMIC)
-ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       WIN32 NOT LINK_TCL_DYNAMIC)
+IF(WIN32)
+  # If no defines are specified, these libs get linked statically
+  ADD_COMPILER_FLAGS("-DBOOST_ALL_DYN_LINK" LINK_BOOST_DYNAMIC)
+  #ADD_COMPILER_FLAGS("-DENET_DLL"           LINK_ENET_DYNAMIC)
+  ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   LINK_LUA5.1_DYNAMIC)
+  # If no defines are specified, these libs get linked dynamically
+  ADD_COMPILER_FLAGS("-DCEGUI_STATIC -DTOLUA_STATIC" NOT LINK_CEGUI_DYNAMIC)
+  ADD_COMPILER_FLAGS("-DOGRE_STATIC_LIB"    NOT LINK_OGRE_DYNAMIC)
+  ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       NOT LINK_TCL_DYNAMIC)
 
+  # 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")
+ENDIF(WIN32)
+
 ######### Library Behaviour (external) ##########
 
 # Use TinyXML++




More information about the Orxonox-commit mailing list