Index: sandbox_qt/cmake/tools/TargetUtilities.cmake
===================================================================
--- sandbox_qt/cmake/tools/TargetUtilities.cmake	(revision 7419)
+++ sandbox_qt/cmake/tools/TargetUtilities.cmake	(revision 7421)
@@ -34,5 +34,4 @@
  #      NO_DLL_INTERFACE:  Link statically with MSVC
  #      NO_SOURCE_GROUPS:  Don't create msvc source groups
- #      MODULE:            For dynamic module libraries (libraries only)
  #      WIN32:             Inherited from ADD_EXECUTABLE (executables only)
  #      PCH_NO_DEFAULT:    Do not make precompiled header files default if
@@ -46,8 +45,9 @@
  #      SOURCE_FILES:      Source files for the target
  #      DEFINE_SYMBOL:     Sets the DEFINE_SYMBOL target property
- #      TOLUA_FILES:       Files with tolua interface
  #      PCH_FILE:          Precompiled header file
  #      PCH_EXCLUDE:       Source files to be excluded from PCH support
  #      OUTPUT_NAME:       If you want a different name than the target name
+ #      QT_MOC_FILES:      List of files to be processed by Qt MOC
+ #      QT_UIC_FILES:      List of files to be processed by Qt UIC
  #  Note:
  #    This function also installs the target!
@@ -60,5 +60,4 @@
 INCLUDE(CMakeDependentOption)
 INCLUDE(CapitaliseName)
-INCLUDE(GenerateToluaBindings)
 INCLUDE(ParseMacroArguments)
 INCLUDE(SourceFileUtilities)
@@ -68,5 +67,5 @@
 
 MACRO(ORXONOX_ADD_LIBRARY _target_name)
-  TU_ADD_TARGET(${_target_name} LIBRARY "MODULE" ${ARGN})
+  TU_ADD_TARGET(${_target_name} LIBRARY "" ${ARGN})
 ENDMACRO(ORXONOX_ADD_LIBRARY)
 
@@ -85,6 +84,6 @@
                   NO_INSTALL         NO_VERSION        ${_additional_switches})
   SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
-                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
-                  PCH_EXCLUDE        OUTPUT_NAME)
+                  DEFINE_SYMBOL      PCH_FILE          PCH_EXCLUDE
+                  OUTPUT_NAME        QT_MOC_FILES      QT_UIC_FILES)
 
   PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
@@ -107,16 +106,19 @@
   ENDIF()
 
-  # Combine source and header files
+  # Combine source, header and QT designer files
   SET(_${_target_name}_files
     ${_${_target_name}_header_files}
     ${_${_target_name}_source_files}
+    ${_arg_QT_UIC_FILES}
   )
   # Remove potential duplicates
   LIST(REMOVE_DUPLICATES _${_target_name}_files)
 
-  # TOLUA_FILES
-  IF(_arg_TOLUA_FILES)
-    GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files
-                            INPUTFILES ${_arg_TOLUA_FILES})
+  # QT MOC and UIC preprocessing
+  IF(_arg_QT_MOC_FILES)
+      QT4_WRAP_CPP(_${_target_name}_files ${_arg_QT_MOC_FILES})
+  ENDIF()
+  IF(_arg_QT_UIC_FILES)
+      QT4_WRAP_UI(_${_target_name}_files ${_arg_QT_UIC_FILES})
   ENDIF()
 
@@ -208,15 +210,4 @@
   ENDIF()
 
-  # Configure modules
-  IF (_arg_MODULE)
-    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES
-      RUNTIME_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Windows
-      LIBRARY_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Unix
-    )
-    ADD_MODULE(${_target_name})
-    # Ensure that the main program depends on the module
-    SET(ORXONOX_MODULES ${ORXONOX_MODULES} ${_target_name} CACHE STRING "" FORCE)
-  ENDIF()
-
   # LINK_LIBRARIES
   IF(_arg_LINK_LIBRARIES)
@@ -251,51 +242,9 @@
   # Install all targets except for static ones (executables also have SHARED in _link_mode)
   IF(${_link_mode} STREQUAL "SHARED" AND NOT _arg_NO_INSTALL)
-    IF(_arg_MODULE)
-      INSTALL(TARGETS ${_target_name}
-        RUNTIME DESTINATION ${MODULE_INSTALL_DIRECTORY}
-        LIBRARY DESTINATION ${MODULE_INSTALL_DIRECTORY}
-      )
-    ELSE()
-      INSTALL(TARGETS ${_target_name}
-        RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
-        LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY}
-      )
-    ENDIF()
+    INSTALL(TARGETS ${_target_name}
+      RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
+      LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY}
+    )
   ENDIF()
 
 ENDMACRO(TU_ADD_TARGET)
-
-
-# Creates a helper file with name <name_of_the_library>${ORXONOX_MODULE_EXTENSION}
-# This helps finding dynamically loadable modules at runtime
-
-FUNCTION(ADD_MODULE _target)
-  # We use the properties to get the name because the librarys name may differ from
-  # the target name (for example orxonox <-> liborxonox)
-
-  GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION)
-  GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE)
-
-  IF(CMAKE_CONFIGURATION_TYPES)
-    FOREACH(_config ${CMAKE_CONFIGURATION_TYPES})
-      SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_config}/${_target_name}${ORXONOX_MODULE_EXTENSION})
-
-      FILE(WRITE ${_module_filename})
-
-      INSTALL(
-        FILES ${_module_filename}
-        DESTINATION ${MODULE_INSTALL_DIRECTORY}
-        CONFIGURATIONS ${_config}
-      )
-    ENDFOREACH()
-  ELSE()
-    SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_target_name}${ORXONOX_MODULE_EXTENSION})
-
-    FILE(WRITE ${_module_filename})
-
-    INSTALL(
-      FILES ${_module_filename}
-      DESTINATION ${MODULE_INSTALL_DIRECTORY}
-    )
-  ENDIF()
-ENDFUNCTION(ADD_MODULE)
