Index: /code/branches/buildsystem/cmake/CheckTardis.cmake
===================================================================
--- /code/branches/buildsystem/cmake/CheckTardis.cmake	(revision 2197)
+++ /code/branches/buildsystem/cmake/CheckTardis.cmake	(revision 2198)
@@ -46,4 +46,5 @@
   #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
   SET(ENV{CEGUIDIR} "/usr/pack/cegui-0.5.0-sd;/usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1")
+  SET(ENV{OGREDIR} "/usr/pack/ogre-1.4.5-sd;/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1")
 ENDIF (IS_TARDIS)
 
Index: /code/branches/buildsystem/cmake/FindOGRE.cmake
===================================================================
--- /code/branches/buildsystem/cmake/FindOGRE.cmake	(revision 2197)
+++ /code/branches/buildsystem/cmake/FindOGRE.cmake	(revision 2198)
@@ -3,6 +3,5 @@
 # This module defines
 #  OGRE_INCLUDE_DIR
-#  OGRE_LIBRARIES, the libraries to link against to use OGRE.
-#  OGRE_LIB_DIR, the location of the libraries
+#  OGRE_LIBRARY, the library to link against to use OGRE.
 #  OGRE_FOUND, If false, do not try to use OGRE
 #
@@ -13,65 +12,33 @@
 #
 # Several changes and additions by Fabian 'x3n' Landau
+# Lots of simplifications by Adrian Friedli
 #                 > www.orxonox.net <
 
-IF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)
-    SET (OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
-ENDIF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR AND OGRE_LIB_DIR)
+FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
+    PATHS
+    $ENV{OGREDIR}
+    /usr/local
+    /usr
+    PATH_SUFFIXES include include/OGRE
+)
 
-IF (WIN32) #Windows
-    FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
-        ../libs/ogre/OgreMain/include
-        ${DEPENDENCY_DIR}/ogre-1.4.9/include
-    )
+#SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
+FIND_LIBRARY(OGRE_LIBRARY
+    NAMES OgreMain
+    PATHS
+    $ENV{OGREDIR}
+    /usr/local
+    /usr
+    PATH_SUFFIXES lib
+)
 
-    SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
-    FIND_LIBRARY(OGRE_LIBDIR NAMES ${OGRE_LIBRARIES} PATHS
-        ../libs/ogre/Samples/Common/bin/Release
-        ${DEPENDENCY_DIR}/ogre-1.4.9/lib
-    )
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGRE DEFAULT_MSG
+    OGRE_LIBRARY
+    OGRE_INCLUDE_DIR
+)
 
-    # Strip the filename from the path
-    IF (OGRE_LIBDIR)
-        GET_FILENAME_COMPONENT(OGRE_LIBDIR ${OGRE_LIBDIR} PATH)
-        SET (OGRE_LIB_DIR ${OGRE_LIBDIR} CACHE FILEPATH "")
-    ENDIF (OGRE_LIBDIR)
-ELSE (WIN32) #Unix
-    FIND_PACKAGE(PkgConfig)
-    PKG_SEARCH_MODULE(OGRE OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack
-    SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS})
-    SET(OGRE_LIB_DIR ${OGRE_LIBDIR})
-    SET(OGRE_LIBRARIES ${OGRE_LIBRARIES})
-ENDIF (WIN32)
-
-#Do some preparation
-SEPARATE_ARGUMENTS(OGRE_INCLUDE_DIR)
-SEPARATE_ARGUMENTS(OGRE_LIBRARIES)
-
-SET (OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "")
-SET (OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
-SET (OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
-
-IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR)
-    SET(OGRE_FOUND TRUE)
-ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES AND OGRE_LIB_DIR)
-
-IF (OGRE_FOUND)
-    IF (NOT OGRE_FIND_QUIETLY)
-        MESSAGE(STATUS "Ogre was found.")
-        IF (VERBOSE_FIND)
-            MESSAGE (STATUS "  include path: ${OGRE_INCLUDE_DIR}")
-            MESSAGE (STATUS "  library path: ${OGRE_LIB_DIR}")
-            MESSAGE (STATUS "  libraries:    ${OGRE_LIBRARIES}")
-        ENDIF (VERBOSE_FIND)
-    ENDIF (NOT OGRE_FIND_QUIETLY)
-ELSE (OGRE_FOUND)
-    IF (NOT OGRE_INCLUDE_DIR)
-        MESSAGE(SEND_ERROR "Ogre include path was not found.")
-    ENDIF (NOT OGRE_INCLUDE_DIR)
-    IF (NOT OGRE_LIB_DIR)
-        MESSAGE(SEND_ERROR "Ogre library was not found.")
-    ENDIF (NOT OGRE_LIB_DIR)
-    IF (NOT OGRE_LIBRARIES)
-        MESSAGE(SEND_ERROR "Ogre libraries not known.")
-    ENDIF (NOT OGRE_LIBRARIES)
-ENDIF (OGRE_FOUND)
+MARK_AS_ADVANCED(
+    OGRE_LIBRARY
+    OGRE_INCLUDE_DIR
+)
Index: /code/branches/buildsystem/src/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/src/CMakeLists.txt	(revision 2197)
+++ /code/branches/buildsystem/src/CMakeLists.txt	(revision 2198)
@@ -14,10 +14,4 @@
   ${DirectX_INCLUDE_DIR}
   ${ZLIB_INCLUDE_DIR}
-)
-
-# TODO: remove this after the CMake Modules have been fixed and use absolut paths
-# Set the search paths for the linking
-LINK_DIRECTORIES(
-  ${OGRE_LIB_DIR}
 )
 
Index: /code/branches/buildsystem/src/core/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/src/core/CMakeLists.txt	(revision 2197)
+++ /code/branches/buildsystem/src/core/CMakeLists.txt	(revision 2198)
@@ -59,5 +59,5 @@
 
 TARGET_LINK_LIBRARIES(core
-  ${OGRE_LIBRARIES}
+  ${OGRE_LIBRARY}
   ${Boost_THREAD_LIBRARY}
   ${Boost_FILESYSTEM_LIBRARY}
Index: /code/branches/buildsystem/src/network/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/src/network/CMakeLists.txt	(revision 2197)
+++ /code/branches/buildsystem/src/network/CMakeLists.txt	(revision 2198)
@@ -41,5 +41,5 @@
   ADD_EXECUTABLE(networktest ${TEST_SRC_FILES})
   TARGET_LINK_LIBRARIES( networktest
-    ${OGRE_LIBRARIES}
+    ${OGRE_LIBRARY}
     network
     ${ENet_LIBRARIES}
Index: /code/branches/buildsystem/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/src/orxonox/CMakeLists.txt	(revision 2197)
+++ /code/branches/buildsystem/src/orxonox/CMakeLists.txt	(revision 2198)
@@ -91,5 +91,5 @@
 
 TARGET_LINK_LIBRARIES( orxonox
-  ${OGRE_LIBRARIES}
+  ${OGRE_LIBRARY}
   ${CEGUI_LIBRARY}
   ${LUA_LIBRARIES}
Index: /code/branches/buildsystem/src/util/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/src/util/CMakeLists.txt	(revision 2197)
+++ /code/branches/buildsystem/src/util/CMakeLists.txt	(revision 2198)
@@ -13,5 +13,5 @@
 
 ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES})
-TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARIES})
+TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY})
 
 ADD_SUBDIRECTORY(testing)
