Index: code/branches/buildsystem2/cmake/ConfigMSVC.cmake
===================================================================
--- code/branches/buildsystem2/cmake/ConfigMSVC.cmake	(revision 2583)
+++ code/branches/buildsystem2/cmake/ConfigMSVC.cmake	(revision 2585)
@@ -54,5 +54,5 @@
   SET(ENV{OPENALDIR}         ${MSVC_LIBRARY_DIR}/openal-1.1)
   SET(ENV{LUA_DIR}           ${MSVC_LIBRARY_DIR}/lua-5.1.3)
-  SET(ENV{OGRE_HOME}         ${MSVC_LIBRARY_DIR}/ogre-1.4.9)
+  SET(ENV{OGRE_HOME}        "${MSVC_LIBRARY_DIR}/ogre-1.4.9;${ORXONOX_LIBRARY_BIN_DIR}")
   SET(TCL_INCLUDE_PATH       ${MSVC_LIBRARY_DIR}/tcl-8.5.2/include)
   SET(TCL_LIBRARY            ${MSVC_LIBRARY_DIR}/tcl-8.5.2/lib/tcl85t.lib)
Index: code/branches/buildsystem2/cmake/ConfigPlatforms.cmake
===================================================================
--- code/branches/buildsystem2/cmake/ConfigPlatforms.cmake	(revision 2583)
+++ code/branches/buildsystem2/cmake/ConfigPlatforms.cmake	(revision 2585)
@@ -44,4 +44,10 @@
 ENDIF(EXTRA_WARNINGS)
 
+SET(ORXONOX_MEDIA_DIRECTORY "${CMAKE_SOURCE_DIR}/../media")
+# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
+# Render systems may be optional, but at least one has to be found in FindOgre
+SET(OGRE_PLUGINS RenderSystem_GL RenderSystem_Direct3D9 Plugin_ParticleFX Plugin_CgProgramManager)
+
+
 ###### Default Compiler/Linker Options ##########
 # Most people use GCC to compile orxonox, so use that as default
Index: code/branches/buildsystem2/cmake/FindOGRE.cmake
===================================================================
--- code/branches/buildsystem2/cmake/FindOGRE.cmake	(revision 2583)
+++ code/branches/buildsystem2/cmake/FindOGRE.cmake	(revision 2585)
@@ -13,4 +13,5 @@
 # Several changes and additions by Fabian 'x3n' Landau
 # Lots of simplifications by Adrian Friedli
+# Plugin checking by Reto Grieder
 #                 > www.orxonox.net <
 
@@ -25,10 +26,10 @@
     NAMES OgreMain
     PATHS $ENV{OGRE_HOME} /usr/local /usr
-    PATH_SUFFIXES lib bin/Release bin/release
+    PATH_SUFFIXES lib bin/Release bin/release Release release
 )
 FIND_LIBRARY(OGRE_LIBRARY_DEBUG
     NAMES OgreMain${LIBRARY_DEBUG_POSTFIX}
     PATHS $ENV{OGRE_HOME} /usr/local /usr
-    PATH_SUFFIXES lib bin/Debug bin/debug
+    PATH_SUFFIXES lib bin/Debug bin/debug Debug debug
 )
 
@@ -41,4 +42,77 @@
 HandleLibraryTypes(OGRE)
 
+###############################################
+# Also make sure we have the required plugins #
+###############################################
+
+IF(WIN32)
+    # On Windows we need only *.dll, not *.lib. Especially the MSVC generator doesn't look for *.dll
+    SET(CMAKE_FIND_LIBRARY_SUFFIXES_STORED ${CMAKE_FIND_LIBRARY_SUFFIXES})
+    SET(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
+ENDIF(WIN32)
+SET(OGRE_RENDER_SYSTEM_FOUND FALSE)
+FOREACH(_plugin ${OGRE_PLUGINS})
+    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_OPTIMIZED
+        NAMES ${_plugin}
+        PATHS $ENV{OGRE_HOME}
+        PATH_SUFFIXES lib lib/OGRE bin bin/Release bin/release Release release
+    )
+    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG
+        NAMES ${_plugin}${LIBRARY_DEBUG_POSTFIX}
+        PATHS $ENV{OGRE_HOME} /usr/local /usr
+        PATH_SUFFIXES lib lib/OGRE bin bin/Debug bin/debug Debug debug
+    )
+    # We only need at least one render system. Check at the end
+    IF(NOT ${_plugin} MATCHES "RenderSystem")
+      SET(OGRE_PLUGIN_${_plugin}_FIND_REQUIRED TRUE)
+    ELSE(NOT ${_plugin} MATCHES "RenderSystem")
+      SET(OGRE_PLUGIN_${_plugin}_FIND_REQUIRED FALSE)
+      SET(OGRE_RENDER_SYSTEM_FOUND TRUE)
+    ENDIF(NOT ${_plugin} MATCHES "RenderSystem")
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGRE_PLUGIN_${_plugin}
+        "Could not find OGRE plugin named ${_plugin}"
+        OGRE_PLUGIN_${_plugin}_OPTIMIZED
+    )
+
+    # If debug version is not available, release will do as well
+    IF(NOT OGRE_PLUGIN_${_plugin}_DEBUG)
+        SET(OGRE_PLUGIN_${_plugin}_DEBUG ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} CACHE STRING "")
+    ENDIF(NOT OGRE_PLUGIN_${_plugin}_DEBUG)
+    MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG)
+
+    ### Set variables to configure orxonox.ini correctly afterwards in bin/ ###
+    # Check and set the folders
+    GET_FILENAME_COMPONENT(_release_folder ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} PATH)
+    IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder)
+        MESSAGE(FATAL_ERROR "Ogre release plugins have to be in the same folder!")
+    ENDIF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder)
+    SET(OGRE_PLUGINS_FOLDER_RELEASE ${_release_folder})
+    GET_FILENAME_COMPONENT(_debug_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH)
+    IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder)
+        MESSAGE(FATAL_ERROR "Ogre debug plugins have to be in the same folder!")
+    ENDIF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder)
+    SET(OGRE_PLUGINS_FOLDER_DEBUG ${_debug_folder})
+
+    # Create a list with the plugins for relase and debug configurations
+    LIST(APPEND OGRE_PLUGINS_RELEASE ${_plugin})
+    IF(OGRE_PLUGIN_${_plugin}_DEBUG)
+        LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin}${LIBRARY_DEBUG_POSTFIX})
+    ELSE(OGRE_PLUGIN_${_plugin}_DEBUG)
+        LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin})
+    ENDIF(OGRE_PLUGIN_${_plugin}_DEBUG)
+ENDFOREACH(_plugin)
+IF(NOT OGRE_RENDER_SYSTEM_FOUND)
+    MESSAGE(FATAL_ERROR "Could not find an OGRE render system plugin")
+ENDIF(NOT OGRE_RENDER_SYSTEM_FOUND)
+IF(WIN32)
+    # Restore previous settings (see above before FOREACH)
+    SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_STORED})
+ENDIF(WIN32)
+
+# List has to be comma separated for orxonox.ini
+STRING(REPLACE ";" ", " OGRE_PLUGINS_RELEASE "${OGRE_PLUGINS_RELEASE}")
+STRING(REPLACE ";" ", " OGRE_PLUGINS_DEBUG   "${OGRE_PLUGINS_DEBUG}")
+
+
 MARK_AS_ADVANCED(
     OGRE_LIBRARY
