Index: code/branches/buildsystem3/cmake/BuildConfig.cmake
===================================================================
--- code/branches/buildsystem3/cmake/BuildConfig.cmake	(revision 2668)
+++ code/branches/buildsystem3/cmake/BuildConfig.cmake	(revision 2673)
@@ -25,5 +25,5 @@
  #
 
-################ Misc Options ###################
+################# Misc Options ##################
 
 # Set binary output directories
@@ -31,4 +31,7 @@
 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+
+# Take care of some CMake 2.6.0 leftovers
+MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
 
 # Sets where to find the external libraries like OgreMain.dll at runtime
@@ -54,9 +57,11 @@
 ENDIF()
 
-OPTION(EXTRA_WARNINGS "Enable some extra warnings (heavily pollutes the output)")
+OPTION(EXTRA_COMPILER_WARNINGS "Enable some extra warnings (heavily pollutes the output)")
+
+
+################# OGRE Plugins ##################
 
 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
-# Render systems may be optional, but at least one has to be found in FindOgre
-SET(OGRE_PLUGINS_INT RenderSystem_GL RenderSystem_Direct3D9 Plugin_ParticleFX)
+SET(OGRE_PLUGINS_INT Plugin_ParticleFX)
 IF(WIN32)
   # CG program manager is probably DirectX related (not available under unix)
@@ -72,5 +77,5 @@
 
 
-############## Compiler Config ##################
+################ Compiler Config ################
 
 INCLUDE(FlagUtilities)
@@ -85,30 +90,27 @@
 ENDIF()
 
-SET(BUILD_CONFIG_USER_SCRIPT "" CACHE FILEPATH
+SET(USER_SCRIPT_BUILD_CONFIG "" CACHE FILEPATH
     "Specify a CMake script if you wish to write your own build config.
      See BuildConfigGCC.cmake or BuildConfigMSVC.cmake for examples.")
-IF(BUILD_CONFIG_USER_SCRIPT)
-  IF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}.cmake)
-    INCLUDE(${BUILD_CONFIG_USER_SCRIPT})
-  ELSEIF(EXISTS ${BUILD_CONFIG_USER_SCRIPT})
-    INCLUDE(${BUILD_CONFIG_USER_SCRIPT})
-  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
-    INCLUDE(${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
+IF(USER_SCRIPT_BUILD_CONFIG)
+  IF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_BUILD_CONFIG}.cmake)
+    INCLUDE(${USER_SCRIPT_BUILD_CONFIG})
+  ELSEIF(EXISTS ${USER_SCRIPT_BUILD_CONFIG})
+    INCLUDE(${USER_SCRIPT_BUILD_CONFIG})
+  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_BUILD_CONFIG})
+    INCLUDE(${CMAKE_MODULE_PATH}/${USER_SCRIPT_BUILD_CONFIG})
   ENDIF()
-ENDIF(BUILD_CONFIG_USER_SCRIPT)
+ENDIF(USER_SCRIPT_BUILD_CONFIG)
 
 
-################ Test options ###################
+################# Test options ##################
 
-OPTION(ENABLE_TESTS "Enable build tests.")
-IF(ENABLE_TESTS)
+OPTION(TESTING_ENABLE "Enable build tests.")
+IF(TESTING_ENABLE)
   ENABLE_TESTING()
-ENDIF(ENABLE_TESTS)
+ENDIF(TESTING_ENABLE)
 
-OPTION(NETWORK_TESTING_ENABLED "Build network testing tools: i.e. chatclient chatserver and alike.")
-OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Build dummyserver4 and dummyclient4.")
-
-
-############ Installation Settings ##############
+OPTION(NETWORK_TESTING_ENABLED "Build network testing tools: i.e. chatclient chatserver and alike.")OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Build dummyserver4 and dummyclient4.")
+############# Installation Settings #############
 
 IF(UNIX)
@@ -133,5 +135,5 @@
 
 
-################# Unix rpath ####################
+################## Unix rpath ###################
 
 # use, i.e. don't skip the full RPATH for the build tree
@@ -150,5 +152,5 @@
 
 
-####### Static/Dynamic linking defines ##########
+######## Static/Dynamic linking defines #########
 
 # Disable Boost auto linking completely
Index: code/branches/buildsystem3/cmake/BuildConfigGCC.cmake
===================================================================
--- code/branches/buildsystem3/cmake/BuildConfigGCC.cmake	(revision 2668)
+++ code/branches/buildsystem3/cmake/BuildConfigGCC.cmake	(revision 2673)
@@ -57,5 +57,5 @@
 
 # Increase warning level if requested
-IF(EXTRA_WARNINGS)
+IF(EXTRA_COMPILER_WARNINGS)
   REMOVE_COMPILER_FLAGS("-Wall" CACHE)
   ADD_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE)
Index: code/branches/buildsystem3/cmake/BuildConfigMSVC.cmake
===================================================================
--- code/branches/buildsystem3/cmake/BuildConfigMSVC.cmake	(revision 2668)
+++ code/branches/buildsystem3/cmake/BuildConfigMSVC.cmake	(revision 2673)
@@ -26,5 +26,5 @@
 ######################## Options ########################
 
-OPTION(ACTIVATE_VISUAL_LEAK_DETECTOR "Memory leak detector" FALSE)
+OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" FALSE)
 
 #################### Compiler Flags #####################
@@ -65,5 +65,5 @@
 
 # Increase warning level if requested
-IF(EXTRA_WARNINGS)
+IF(EXTRA_COMPILER_WARNINGS)
   REMOVE_COMPILER_FLAGS("-W1 -W2 -W3" CACHE)
   ADD_COMPILER_FLAGS   ("-W4" CACHE)
Index: code/branches/buildsystem3/cmake/CheckOGREPlugins.cmake
===================================================================
--- code/branches/buildsystem3/cmake/CheckOGREPlugins.cmake	(revision 2668)
+++ code/branches/buildsystem3/cmake/CheckOGREPlugins.cmake	(revision 2673)
@@ -31,4 +31,7 @@
  #    OGRE_PLUGINS_DEBUG          Names of the debug plugins without extension
  #    OGRE_PLUGINS_RELEASE        Names of the release plugins without ext.
+ #  Note:
+ #    You must not specify render systems as input, but the ones found will be
+ #    present in the output variables.
  #
 
@@ -44,6 +47,7 @@
   SET(CMAKE_FIND_LIBRARY_PREFIXES "")
 
+  SET(OGRE_RENDER_SYSTEMS RenderSystem_GL RenderSystem_Direct3D9)
   SET(OGRE_RENDER_SYSTEM_FOUND FALSE)
-  FOREACH(_plugin ${OGRE_PLUGINS})
+  FOREACH(_plugin ${OGRE_PLUGINS} ${OGRE_RENDER_SYSTEMS})
     FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_OPTIMIZED
       NAMES ${_plugin}
Index: code/branches/buildsystem3/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/buildsystem3/cmake/LibraryConfig.cmake	(revision 2668)
+++ code/branches/buildsystem3/cmake/LibraryConfig.cmake	(revision 2673)
@@ -39,7 +39,7 @@
 SET(_option_msg "Set this to true to use precompiled dependecy archives")
 IF(WIN32)
-  OPTION(USE_DEPENDENCY_PACKAGE "${_option_msg}" ON)
+  OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" ON)
 ELSE(WIN32)
-  OPTION(USE_DEPENDENCY_PACKAGE "${_option_msg}" FALSE)
+  OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" FALSE)
 ENDIF(WIN32)
 
@@ -48,13 +48,15 @@
 INCLUDE(LibraryConfigApple)
 
-IF(USE_DEPENDENCY_PACKAGE)
-  FIND_PATH(DEPENDENCY_DIR
+IF(DEPENDENCY_PACKAGE_ENABLE)
+  GET_FILENAME_COMPONENT(_dep_dir_1 ${CMAKE_SOURCE_DIR}/../dependencies ABSOLUTE)
+  GET_FILENAME_COMPONENT(_dep_dir_2 ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies ABSOLUTE)
+  FIND_PATH(DEPENDENCY_PACKAGE_DIR
     NAMES PackageConfigMSVC.cmake PackageConfigMinGW.cmake
     PATHS
       ${CMAKE_SOURCE_DIR}/dependencies
-      ${CMAKE_SOURCE_DIR}/../dependencies
-      ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies
+      ${_dep_dir_1}
+      ${_dep_dir_2}
   )
-  IF(NOT DEPENDENCY_DIR)
+  IF(NOT DEPENDENCY_PACKAGE_DIR)
     MESSAGE(STATUS "Warning: Could not find dependency directory."
                    "Disable LIBRARY_USE_PACKAGE if you have none intalled.")
@@ -62,8 +64,6 @@
     FILE(GLOB _package_config_files "${DEPENDENCY_DIR}/PackageConfig*.cmake")
     FOREACH(_file ${_package_config_files})
-      INCLUDE(${_file})
-    ENDFOREACH(_file)
-
-    # On Windows, DLLs have to be in the executable folder
+      INCLUDE(${_file})    ENDFOREACH(_file)
+    # On Windows, DLLs have to be in the executable folder, install them
     IF(DEP_BINARY_DIR AND WIN32)
       # When installing a debug version, we really can't know which libraries
@@ -85,20 +85,20 @@
       )
     ENDIF(DEP_BINARY_DIR AND WIN32)
-  ENDIF(NOT DEPENDENCY_DIR)
-ENDIF(USE_DEPENDENCY_PACKAGE)
+  ENDIF(NOT DEPENDENCY_PACKAGE_DIR)
+ENDIF(DEPENDENCY_PACKAGE_ENABLE)
 
 # User script
-SET(LIBRARY_CONFIG_USER_SCRIPT "" CACHE FILEPATH
+SET(USER_SCRIPT_LIBRARY_CONFIG "" CACHE FILEPATH
     "Specify a CMake script if you wish to write your own library path config.
      See LibraryConfigTardis.cmake or LibraryConfigMinGW.cmake for examples.")
-IF(LIBRARY_CONFIG_USER_SCRIPT)
-  IF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT}.cmake)
-    INCLUDE(${LIBRARY_CONFIG_USER_SCRIPT})
-  ELSEIF(EXISTS ${LIBRARY_CONFIG_USER_SCRIPT})
-    INCLUDE(${LIBRARY_CONFIG_USER_SCRIPT})
-  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
-    INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
+IF(USER_SCRIPT_LIBRARY_CONFIG)
+  IF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG}.cmake)
+    INCLUDE(${USER_SCRIPT_LIBRARY_CONFIG})
+  ELSEIF(EXISTS ${USER_SCRIPT_LIBRARY_CONFIG})
+    INCLUDE(${USER_SCRIPT_LIBRARY_CONFIG})
+  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG})
+    INCLUDE(${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG})
   ENDIF()
-ENDIF(LIBRARY_CONFIG_USER_SCRIPT)
+ENDIF(USER_SCRIPT_LIBRARY_CONFIG)
 
 
@@ -180,4 +180,6 @@
   FIND_PACKAGE(Boost 1.35 REQUIRED system)
 ENDIF()
+# No auto linking, so this option is useless anyway
+MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
 
 ####### Static/Dynamic linking options ##########
