Index: /code/branches/buildsystem2/cmake/DocumentationTarget.cmake
===================================================================
--- /code/branches/buildsystem2/cmake/DocumentationTarget.cmake	(revision 2636)
+++ /code/branches/buildsystem2/cmake/DocumentationTarget.cmake	(revision 2637)
@@ -18,56 +18,36 @@
 # author Jan Woetzel 2004-2006
 # www.mip.informatik.uni-kiel.de/~jw
+# Adjustments for Orxonox by Reto Grieder
 
-
-FIND_PACKAGE(Doxygen)
+FIND_PACKAGE(Doxygen QUIET)
 
 IF (DOXYGEN_FOUND)
-
   # click+jump in Emacs and Visual Studio (for doxy.config) (jw)
-  IF    (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
+  IF(CMAKE_BUILD_TOOL MATCHES "msdev|devenv")
     SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
-  ELSE  (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
+  ELSE()
     SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
-  ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
+  ENDIF()
   
   # we need latex for doxygen because of the formulas
-  FIND_PACKAGE(LATEX)
-  IF    (NOT LATEX_COMPILER)
-    MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
-  ENDIF (NOT LATEX_COMPILER)
-  IF    (NOT MAKEINDEX_COMPILER)
-    MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
-  ENDIF (NOT MAKEINDEX_COMPILER)
-  IF    (NOT DVIPS_CONVERTER)
-    MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
-  ENDIF (NOT DVIPS_CONVERTER)
+  # Orxonox doesn't
+  #FIND_PACKAGE(LATEX)
+  #IF    (NOT LATEX_COMPILER)
+  #  MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
+  #ENDIF (NOT LATEX_COMPILER)
+  #IF    (NOT MAKEINDEX_COMPILER)
+  #  MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
+  #ENDIF (NOT MAKEINDEX_COMPILER)
+  #IF    (NOT DVIPS_CONVERTER)
+  #  MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
+  #ENDIF (NOT DVIPS_CONVERTER)
   
-  IF   (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
-    MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
-    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in 
-      ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
-      @ONLY )
+  IF(EXISTS ${CMAKE_SOURCE_DIR}/doxy.config.in)
+    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doxy.config.in ${CMAKE_BINARY_DIR}/doxy.config @ONLY)
     # use (configured) doxy.config from (out of place) BUILD tree:
-    SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
-  ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
-    # use static hand-edited doxy.config from SOURCE tree:
-    SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
-    IF   (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
-      MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
-    ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
-      IF   (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
-        # using template doxy.config.in
-        MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
-        CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in 
-          ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
-          @ONLY )
-        SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
-      ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
-        # failed completely...
-        MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
-      ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
-
-    ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
-  ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
+    SET(DOXY_CONFIG ${CMAKE_BINARY_DIR}/doxy.config)
+  ELSE()
+    MESSAGE(STATUS "Warning: Could not find dox.config.in in the root directory.")
+  ENDIF()
   
   ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
@@ -76,47 +56,17 @@
   # HTMLHelp DLL must be in path!
   # fallback: use hhw.exe interactively
-  IF    (WIN32)
+  IF(WIN32)
     FIND_PACKAGE(HTMLHelp)
-    IF   (HTML_HELP_COMPILER)      
-      SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\doc\\html\\index.hhp")
-      STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
-      # MESSAGE(SEND_ERROR "DBG  HHP_FILE=${HHP_FILE}")
-      ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
-      ADD_DEPENDENCIES (winhelp doc)
-     
-      IF (NOT TARGET_DOC_SKIP_INSTALL)
-      # install windows help?
-      # determine useful name for output file 
-      # should be project and version unique to allow installing 
-      # multiple projects into one global directory      
-      IF   (EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
-        IF   (PROJECT_NAME)
-          SET(OUT "${PROJECT_NAME}")
-        ELSE (PROJECT_NAME)
-          SET(OUT "Documentation") # default
-        ENDIF(PROJECT_NAME)
-        IF   (${PROJECT_NAME}_VERSION_MAJOR)
-          SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
-          IF   (${PROJECT_NAME}_VERSION_MINOR)
-            SET(OUT  "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
-            IF   (${PROJECT_NAME}_VERSION_PATCH)
-              SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")      
-            ENDIF(${PROJECT_NAME}_VERSION_PATCH)
-          ENDIF(${PROJECT_NAME}_VERSION_MINOR)
-        ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
-        # keep suffix
-        SET(OUT  "${OUT}.chm")
-        
-        #MESSAGE("DBG ${PROJECT_BINARY_DIR}/doc/html/index.chm \n${OUT}")
-        # create target used by install and package commands 
-        INSTALL(FILES "${PROJECT_BINARY_DIR}/doc/html/index.chm"
-          DESTINATION "doc"
-          RENAME "${OUT}"
-        )
-      ENDIF(EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
-      ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
-
+    IF(HTML_HELP_COMPILER)      
+      SET(TMP ${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.hhp)
+      STRING(REGEX REPLACE "/" "\\\\" HHP_FILE ${TMP})
+      ADD_CUSTOM_TARGET(chmdoc ${HTML_HELP_COMPILER} ${HHP_FILE})
+      IF(NOT MSVC)
+        ADD_DEPENDENCIES(chmdoc doc)
+      ELSE(NOT MSVC)
+        # Do not add the dependency because msvc will then always build
+        # Doxygen, which is not very comforting.
+      ENDIF(NOT MSVC)
     ENDIF(HTML_HELP_COMPILER)
-    # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
   ENDIF (WIN32) 
 ENDIF(DOXYGEN_FOUND)
Index: /code/branches/buildsystem2/cmake/LibraryConfig.cmake
===================================================================
--- /code/branches/buildsystem2/cmake/LibraryConfig.cmake	(revision 2636)
+++ /code/branches/buildsystem2/cmake/LibraryConfig.cmake	(revision 2637)
@@ -132,6 +132,6 @@
 MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
 
-##### TCL #####
-# We only require TCL, so avoid confusing user about other TCL stuff by
+##### Tcl #####
+# We only require Tcl, so avoid confusing user about other Tcl stuff by
 # applying a little workaround
 SET(Tclsh_FIND_QUIETLY TRUE)
