Index: code/branches/presentation3/cmake/TargetUtilities.cmake
===================================================================
--- code/branches/presentation3/cmake/TargetUtilities.cmake	(revision 7134)
+++ code/branches/presentation3/cmake/TargetUtilities.cmake	(revision 7135)
@@ -47,4 +47,6 @@
  #      SOURCE_FILES:      Source files for the target
  #      DEFINE_SYMBOL:     Sets the DEFINE_SYMBOL target property
+ #                         Usage: DEFINE_SYMBOL static "symbol" shared "symbol2"
+ #                         (or shared "symbol2" static "symbol")
  #      TOLUA_FILES:       Files with tolua interface
  #      PCH_FILE:          Precompiled header file
@@ -225,5 +227,20 @@
   # DEFINE_SYMBOL
   IF(_arg_DEFINE_SYMBOL)
-    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES DEFINE_SYMBOL ${_arg_DEFINE_SYMBOL})
+    # Format is: static "static_symbol" shared "shared_symbol"
+    # but the order doesn't matter
+    LIST(LENGTH _arg_DEFINE_SYMBOL _define_symbol_length)
+    IF (_define_symbol_length LESS 2)
+      MESSAGE(FATAL_ERROR "Number of expected arguments for DEFINE_SYMBOL is at least 2: static \"STATIC_SYMBOL\" shared \"SHARED_SYMBOL\"")
+    ENDIF()
+    STRING(TOLOWER "${_arg_STATIC}${_arg_SHARED}" _static_shared_lower)
+    LIST(FIND _arg_DEFINE_SYMBOL ${_static_shared_lower} _symbol_definition_index)
+    MATH(EXPR _symbol_definition_index "${_symbol_definition_index} + 1")
+    IF(_symbol_definition_index LESS _define_symbol_length)
+      LIST(GET _arg_DEFINE_SYMBOL ${_symbol_definition_index} _symbol_definition)
+      SET_TARGET_PROPERTIES(${_target_name} PROPERTIES DEFINE_SYMBOL ${_symbol_definition})
+    ENDIF()
+  ELSEIF(NOT _arg_ORXONOX_EXTERNAL)
+    # Automatically add the macro definitions for our own libraries
+    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES DEFINE_SYMBOL "${_target_name_upper}_${_arg_STATIC}${_arg_SHARED}_BUILD")
   ENDIF()
 
Index: code/branches/presentation3/src/external/ceguilua/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/external/ceguilua/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/external/ceguilua/CMakeLists.txt	(revision 7135)
@@ -75,5 +75,5 @@
   NO_SOURCE_GROUPS
   DEFINE_SYMBOL
-    "CEGUILUA_EXPORTS"
+    shared "CEGUILUA_EXPORTS" static "CEGUILUA_STATIC"
   VERSION
     ${CEGUI_VERSION}
Index: code/branches/presentation3/src/external/ogreceguirenderer/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/external/ogreceguirenderer/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/external/ogreceguirenderer/CMakeLists.txt	(revision 7135)
@@ -36,5 +36,5 @@
     ${CEGUI_LIBRARY}
   DEFINE_SYMBOL
-    "OGRE_GUIRENDERER_EXPORTS"
+    shared "OGRE_GUIRENDERER_EXPORTS" static "OGRE_GUIRENDERER_STATIC_LIB"
   VERSION
     1.4.9
Index: code/branches/presentation3/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/external/ois/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/external/ois/CMakeLists.txt	(revision 7135)
@@ -57,5 +57,5 @@
   ORXONOX_EXTERNAL
   DEFINE_SYMBOL
-    "OIS_NONCLIENT_BUILD"
+    shared "OIS_NONCLIENT_BUILD" static ""
   VERSION
     1.2
Index: code/branches/presentation3/src/external/tolua/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/external/tolua/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/external/tolua/CMakeLists.txt	(revision 7135)
@@ -35,5 +35,5 @@
   ORXONOX_EXTERNAL
   DEFINE_SYMBOL
-    "TOLUA_SHARED_BUILD"
+    shared "TOLUA_SHARED_BUILD" static "TOLUA_STATIC_BUILD"
   VERSION
     1.0.92
Index: code/branches/presentation3/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/libraries/core/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/libraries/core/CMakeLists.txt	(revision 7135)
@@ -96,6 +96,4 @@
     input/KeyBinder.h
     input/KeyBinderManager.h
-  DEFINE_SYMBOL
-    "CORE_SHARED_BUILD"
   PCH_FILE
     CorePrecompiledHeaders.h
Index: code/branches/presentation3/src/libraries/network/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/libraries/network/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/libraries/network/CMakeLists.txt	(revision 7135)
@@ -60,6 +60,4 @@
 
 ORXONOX_ADD_LIBRARY(network
-  DEFINE_SYMBOL
-    "NETWORK_SHARED_BUILD"
   PCH_FILE
     NetworkPrecompiledHeaders.h
Index: code/branches/presentation3/src/libraries/tools/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/libraries/tools/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/libraries/tools/CMakeLists.txt	(revision 7135)
@@ -20,6 +20,4 @@
 ORXONOX_ADD_LIBRARY(tools
   FIND_HEADER_FILES
-  DEFINE_SYMBOL
-    "TOOLS_SHARED_BUILD"
   LINK_LIBRARIES
     core
Index: code/branches/presentation3/src/libraries/util/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/libraries/util/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/libraries/util/CMakeLists.txt	(revision 7135)
@@ -49,6 +49,4 @@
 ORXONOX_ADD_LIBRARY(util
   FIND_HEADER_FILES
-  DEFINE_SYMBOL
-    "UTIL_SHARED_BUILD"
   LINK_LIBRARIES
     ${CEGUI_LIBRARY}
Index: code/branches/presentation3/src/modules/designtools/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/designtools/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/designtools/CMakeLists.txt	(revision 7135)
@@ -8,6 +8,4 @@
   MODULE
   FIND_HEADER_FILES
-  DEFINE_SYMBOL
-    "DESIGNTOOLS_SHARED_BUILD"
   LINK_LIBRARIES
     orxonox
Index: code/branches/presentation3/src/modules/objects/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/objects/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/objects/CMakeLists.txt	(revision 7135)
@@ -15,6 +15,4 @@
   PCH_FILE
     ObjectsPrecompiledHeaders.h
-  DEFINE_SYMBOL
-    "OBJECTS_SHARED_BUILD"
   LINK_LIBRARIES
     orxonox
Index: code/branches/presentation3/src/modules/overlays/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/overlays/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/overlays/CMakeLists.txt	(revision 7135)
@@ -14,6 +14,4 @@
   PCH_FILE
     OverlaysPrecompiledHeaders.h
-  DEFINE_SYMBOL
-    "OVERLAYS_SHARED_BUILD"
   LINK_LIBRARIES
     orxonox
Index: code/branches/presentation3/src/modules/pickup/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/pickup/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/pickup/CMakeLists.txt	(revision 7135)
@@ -17,6 +17,4 @@
     PickupManager.h
     PickupRepresentation.h
-  DEFINE_SYMBOL
-    "PICKUP_SHARED_BUILD"
   PCH_FILE
     PickupPrecompiledHeaders.h
Index: code/branches/presentation3/src/modules/pong/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/pong/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/pong/CMakeLists.txt	(revision 7135)
@@ -14,6 +14,4 @@
   MODULE
   FIND_HEADER_FILES
-  DEFINE_SYMBOL
-    "PONG_SHARED_BUILD"
   LINK_LIBRARIES
     orxonox
Index: code/branches/presentation3/src/modules/questsystem/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/questsystem/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/questsystem/CMakeLists.txt	(revision 7135)
@@ -29,6 +29,4 @@
     Quest.h
     QuestHint.h
-  DEFINE_SYMBOL
-    "QUESTSYSTEM_SHARED_BUILD"
   PCH_FILE
     QuestsystemPrecompiledHeaders.h
Index: code/branches/presentation3/src/modules/weapons/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/weapons/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/modules/weapons/CMakeLists.txt	(revision 7135)
@@ -13,6 +13,4 @@
   PCH_FILE
     WeaponsPrecompiledHeaders.h
-  DEFINE_SYMBOL
-    "WEAPONS_SHARED_BUILD"
   LINK_LIBRARIES
     orxonox
Index: code/branches/presentation3/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/orxonox/CMakeLists.txt	(revision 7134)
+++ code/branches/presentation3/src/orxonox/CMakeLists.txt	(revision 7135)
@@ -64,6 +64,4 @@
     infos/PlayerInfo.h
     sound/SoundManager.h
-  DEFINE_SYMBOL
-    "ORXONOX_SHARED_BUILD"
   PCH_FILE
     OrxonoxPrecompiledHeaders.h
