Index: code/trunk/cmake/AddSourceFiles.cmake
===================================================================
--- code/trunk/cmake/AddSourceFiles.cmake	(revision 2130)
+++ code/trunk/cmake/AddSourceFiles.cmake	(revision 2131)
@@ -1,2 +1,19 @@
+#    AddSourceFiles.cmake - CMake Module to include source files in subdirectories.
+#    Author: Reto '1337' Grieder (2008)
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
 MACRO(ADD_SOURCE_DIRECTORY _target_list _directory)
 
Index: code/trunk/src/core/CMakeLists.txt
===================================================================
--- code/trunk/src/core/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/core/CMakeLists.txt	(revision 2131)
@@ -42,19 +42,8 @@
   TclThreadManager.cc
 
-  # input
-  input/Button.cc
-  input/CalibratorCallback.cc
-  input/ExtendedInputState.cc
-  input/HalfAxis.cc
-  input/InputBuffer.cc
-  input/InputCommands.cc
-  input/InputManager.cc
-  input/JoyStickDeviceNumberListener.cc
-  input/KeyBinder.cc
-  input/KeyDetector.cc
-  input/SimpleInputState.cc
-
   tolua/tolua_bind.cc
 )
+
+ADD_SOURCE_DIRECTORY(CORE_SRC_FILES input)
 
 GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION)
Index: code/trunk/src/core/input/CMakeLists.txt
===================================================================
--- code/trunk/src/core/input/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/core/input/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,15 @@
+SET( SRC_FILES
+  Button.cc
+  CalibratorCallback.cc
+  ExtendedInputState.cc
+  HalfAxis.cc
+  InputBuffer.cc
+  InputCommands.cc
+  InputManager.cc
+  JoyStickDeviceNumberListener.cc
+  KeyBinder.cc
+  KeyDetector.cc
+  SimpleInputState.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/network/CMakeLists.txt
===================================================================
--- code/trunk/src/network/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/network/CMakeLists.txt	(revision 2131)
@@ -13,12 +13,7 @@
   Synchronisable.cc
   Host.cc
-  packet/Packet.cc
-  packet/Chat.cc
-  packet/ClassID.cc
-  packet/Acknowledgement.cc
-  packet/Gamestate.cc
-  packet/Welcome.cc
-  packet/DeleteObjects.cc
 )
+
+ADD_SOURCE_DIRECTORY(NETWORK_SRC_FILES packet)
 
 IF(WIN32)
Index: code/trunk/src/network/packet/CMakeLists.txt
===================================================================
--- code/trunk/src/network/packet/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/network/packet/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,11 @@
+SET( SRC_FILES
+  Packet.cc
+  Chat.cc
+  ClassID.cc
+  Acknowledgement.cc
+  Gamestate.cc
+  Welcome.cc
+  DeleteObjects.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/gamestates/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/gamestates/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/gamestates/CMakeLists.txt	(revision 2131)
@@ -12,3 +12,2 @@
 
 ADD_SOURCE_FILES(SRC_FILES)
-
Index: code/trunk/src/orxonox/gui/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/gui/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/gui/CMakeLists.txt	(revision 2131)
@@ -7,3 +7,2 @@
 
 ADD_SOURCE_FILES(SRC_FILES)
-
Index: code/trunk/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 2131)
@@ -8,62 +8,15 @@
   Tickable.cc
   Test.cc
+  Scene.cc
   Script.cc
-
-  Scene.cc
-  worldentities/WorldEntity.cc
-  worldentities/PositionableEntity.cc
-  worldentities/MovableEntity.cc
-  worldentities/ControllableEntity.cc
-  worldentities/Model.cc
-  worldentities/Billboard.cc
-  worldentities/BlinkingBillboard.cc
-  worldentities/Light.cc
-  worldentities/Camera.cc
-  worldentities/CameraPosition.cc
-  worldentities/SpawnPoint.cc
-  worldentities/ParticleEmitter.cc
-  worldentities/ParticleSpawner.cc
-#  worldentities/Backlight.cc
-
-  quest/AddQuest.cc
-  quest/AddQuestHint.cc
-  quest/AddReward.cc
-  quest/ChangeQuestStatus.cc
-  quest/CompleteQuest.cc
-  quest/FailQuest.cc
-  quest/GlobalQuest.cc
-  quest/LocalQuest.cc
-  quest/Quest.cc
-  quest/QuestDescription.cc
-  quest/QuestEffect.cc
-  quest/QuestHint.cc
-  quest/QuestItem.cc
-  quest/QuestManager.cc
-  quest/Rewardable.cc
-
-  weaponSystem/WeaponSystem.cc
-  weaponSystem/WeaponSet.cc
-  weaponSystem/WeaponSlot.cc
-  weaponSystem/Weapon.cc
-  weaponSystem/Munition.cc
-
-  worldentities/triggers/Trigger.cc
-  worldentities/triggers/DistanceTrigger.cc
-  worldentities/triggers/EventTrigger.cc
-
-  worldentities/pawns/Spectator.cc
-  worldentities/pawns/Pawn.cc
-  worldentities/pawns/SpaceShip.cc
-
-  infos/Info.cc
-  infos/Level.cc
-  infos/PlayerInfo.cc
-  infos/HumanPlayer.cc
-
-  gametypes/Gametype.cc
 )
 
 ADD_SOURCE_DIRECTORY(SRC_FILES controllers)
+ADD_SOURCE_DIRECTORY(SRC_FILES gametypes)
+ADD_SOURCE_DIRECTORY(SRC_FILES infos)
+#ADD_SOURCE_DIRECTORY(SRC_FILES pickup)
+ADD_SOURCE_DIRECTORY(SRC_FILES quest)
+ADD_SOURCE_DIRECTORY(SRC_FILES weaponSystem)
+ADD_SOURCE_DIRECTORY(SRC_FILES worldentities)
 
 ADD_SOURCE_FILES(SRC_FILES)
-
Index: code/trunk/src/orxonox/objects/controllers/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/controllers/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/objects/controllers/CMakeLists.txt	(revision 2131)
@@ -5,3 +5,2 @@
 
 ADD_SOURCE_FILES(SRC_FILES)
-
Index: code/trunk/src/orxonox/objects/gametypes/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,5 @@
+SET( SRC_FILES
+  Gametype.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/infos/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/infos/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,8 @@
+SET( SRC_FILES
+  Info.cc
+  Level.cc
+  PlayerInfo.cc
+  HumanPlayer.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/pickup/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/pickup/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/pickup/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,6 @@
+SET( SRC_FILES
+  ShipEquipmentClasses.cc
+  ShipItem.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/quest/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/quest/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/quest/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,19 @@
+SET( SRC_FILES
+  AddQuest.cc
+  AddQuestHint.cc
+  AddReward.cc
+  ChangeQuestStatus.cc
+  CompleteQuest.cc
+  FailQuest.cc
+  GlobalQuest.cc
+  LocalQuest.cc
+  Quest.cc
+  QuestDescription.cc
+  QuestEffect.cc
+  QuestHint.cc
+  QuestItem.cc
+  QuestManager.cc
+  Rewardable.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/weaponSystem/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/weaponSystem/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/weaponSystem/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,13 @@
+SET( SRC_FILES
+  Munition.cc
+  Weapon.cc
+  WeaponSet.cc
+  WeaponSlot.cc
+  WeaponSystem.cc
+)
+
+#ADD_SOURCE_DIRECTORY(SRC_FILES munitions)
+#ADD_SOURCE_DIRECTORY(SRC_FILES projectiles)
+#ADD_SOURCE_DIRECTORY(SRC_FILES weapons)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/weaponSystem/munitions/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/weaponSystem/munitions/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/weaponSystem/munitions/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,5 @@
+SET( SRC_FILES
+  LaserGunMunition.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/weaponSystem/projectiles/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/weaponSystem/projectiles/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/weaponSystem/projectiles/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,7 @@
+SET( SRC_FILES
+  BillboardProjectile.cc
+  ParticleProjectile.cc
+  Projectile.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/weaponSystem/weapons/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/weaponSystem/weapons/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/weaponSystem/weapons/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,6 @@
+SET( SRC_FILES
+  LaserGun.cc
+  Missile.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,21 @@
+SET( SRC_FILES
+  WorldEntity.cc
+  PositionableEntity.cc
+  MovableEntity.cc
+  ControllableEntity.cc
+  Model.cc
+  Billboard.cc
+  BlinkingBillboard.cc
+  Light.cc
+  Camera.cc
+  CameraPosition.cc
+  SpawnPoint.cc
+  ParticleEmitter.cc
+  ParticleSpawner.cc
+#  Backlight.cc
+)
+
+ADD_SOURCE_DIRECTORY(SRC_FILES pawns)
+ADD_SOURCE_DIRECTORY(SRC_FILES triggers)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/worldentities/pawns/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,7 @@
+SET( SRC_FILES
+  Spectator.cc
+  Pawn.cc
+  SpaceShip.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/objects/worldentities/triggers/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,7 @@
+SET( SRC_FILES
+  Trigger.cc
+  DistanceTrigger.cc
+  EventTrigger.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/overlays/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/overlays/CMakeLists.txt	(revision 2131)
@@ -3,17 +3,9 @@
   OverlayGroup.cc
   OverlayText.cc
-
-  console/InGameConsole.cc
-
-  debug/DebugFPSText.cc
-  debug/DebugRTRText.cc
-
-  hud/HUDBar.cc
-  hud/HUDNavigation.cc
-  hud/HUDRadar.cc
-  hud/HUDSpeedBar.cc
-  hud/ChatOverlay.cc
 )
 
+ADD_SOURCE_DIRECTORY(SRC_FILES console)
+ADD_SOURCE_DIRECTORY(SRC_FILES debug)
+ADD_SOURCE_DIRECTORY(SRC_FILES hud)
+
 ADD_SOURCE_FILES(SRC_FILES)
-
Index: code/trunk/src/orxonox/overlays/console/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/console/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/overlays/console/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,5 @@
+SET( SRC_FILES
+  InGameConsole.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/overlays/debug/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/debug/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/overlays/debug/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,6 @@
+SET( SRC_FILES
+  DebugFPSText.cc
+  DebugRTRText.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/hud/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/overlays/hud/CMakeLists.txt	(revision 2131)
@@ -0,0 +1,9 @@
+SET( SRC_FILES
+  HUDBar.cc
+  HUDNavigation.cc
+  HUDRadar.cc
+  HUDSpeedBar.cc
+  ChatOverlay.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/trunk/src/orxonox/tools/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/tools/CMakeLists.txt	(revision 2130)
+++ code/trunk/src/orxonox/tools/CMakeLists.txt	(revision 2131)
@@ -9,3 +9,2 @@
 
 ADD_SOURCE_FILES(SRC_FILES)
-
