Index: code/branches/kicklib2/cmake/tools/FindALUT.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindALUT.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindALUT.cmake	(revision 8285)
@@ -32,5 +32,5 @@
 FIND_PATH(ALUT_INCLUDE_DIR alut.h
   PATHS $ENV{ALUTDIR}
-  PATH_SUFFIXES include include/AL Headers Headers/AL
+  PATH_SUFFIXES include include/AL
 )
 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
Index: code/branches/kicklib2/cmake/tools/FindCEGUI.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindCEGUI.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindCEGUI.cmake	(revision 8285)
@@ -34,5 +34,5 @@
 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
   PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
+  PATH_SUFFIXES include include/CEGUI
 )
 
@@ -44,5 +44,5 @@
   NAMES CEGUIBase CEGUI
   PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES lib bin CEGUIBase.framework CEGUI.framework
+  PATH_SUFFIXES lib bin
 )
 FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
@@ -56,16 +56,19 @@
 # Find CEGUILua headers
 FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
-  PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
-  PATH_SUFFIXES include include/CEGUI CEGUILuaScriptModule.framework/Headers
+  PATHS
+    $ENV{CEGUIDIR}
+    $ENV{CEGUILUADIR}
+    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
+  PATH_SUFFIXES include include/CEGUI
 )
 # Find CEGUILua libraries
 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
   NAMES CEGUILua CEGUILuaScriptModule
-  PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES lib bin CEGUILuaScriptModule.framework
+  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
+  PATH_SUFFIXES lib bin
 )
 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
   NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
-  PATHS $ENV{CEGUIDIR}
+  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
   PATH_SUFFIXES lib bin
 )
@@ -79,18 +82,17 @@
     # For newer CEGUI versions >= 0.7
     ${CEGUILUA_INCLUDE_DIR}/support/tolua++
-    # For Apples
-    $ENV{CEGUIDIR}
-  PATH_SUFFIXES ceguitolua++.framework/Headers
-  NO_DEFAULT_PATH # MUST be in CEGUILUA_INCLUDE_DIR somewhere
+    # For Mac OS X, tolua++ is a separate framework in the dependency package
+    ${DEP_FRAMEWORK_DIR}
+  NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
 )
 # Find CEGUI Tolua++ libraries
 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
   NAMES CEGUItoluapp tolua++ ceguitolua++
-  PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES lib bin ceguitolua++.framework
+  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
+  PATH_SUFFIXES lib bin
 )
 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
   NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
-  PATHS $ENV{CEGUIDIR}
+  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
   PATH_SUFFIXES lib bin
 )
@@ -101,16 +103,19 @@
   # Find CEGUI OGRE Renderer headers
   FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
-    PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
-    PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
+    PATHS
+      $ENV{CEGUIDIR}
+      $ENV{CEGUIOGRERENDERERDIR}
+      ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
+    PATH_SUFFIXES include include/CEGUI
   )
   # Find CEGUI OGRE Renderer libraries
   FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     NAMES CEGUIOgreRenderer
-    PATHS $ENV{CEGUIDIR}
+    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
     PATH_SUFFIXES lib bin
   )
   FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
     NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d
-    PATHS $ENV{CEGUIDIR}
+    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
     PATH_SUFFIXES lib bin
   )
Index: code/branches/kicklib2/cmake/tools/FindLua5.1.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindLua5.1.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindLua5.1.cmake	(revision 8285)
@@ -56,5 +56,5 @@
 # Find include path
 FIND_PATH(LUA5.1_INCLUDE_DIR lua.h
-  PATHS $ENV{LUA5.1_DIR}
+  PATHS $ENV{LUA5.1_DIR} $ENV{LUA_DIR}
   PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
 )
Index: code/branches/kicklib2/cmake/tools/FindOGRE.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindOGRE.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindOGRE.cmake	(revision 8285)
@@ -23,5 +23,5 @@
 FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
   PATHS $ENV{OGRE_HOME}
-  PATH_SUFFIXES include include/OGRE Ogre.framework/Headers
+  PATH_SUFFIXES include include/OGRE
 )
 FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
@@ -33,5 +33,5 @@
   NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d
   PATHS $ENV{OGRE_HOME}
-  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A
+  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug
 )
 
Index: code/branches/kicklib2/cmake/tools/FindOgg.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindOgg.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindOgg.cmake	(revision 8285)
@@ -22,10 +22,10 @@
 )
 FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
-  NAMES ogg ogg-0
+  NAMES ogg ogg-0 libogg
   PATHS $ENV{OGGDIR}
   PATH_SUFFIXES lib
 )
 FIND_LIBRARY(OGG_LIBRARY_DEBUG
-  NAMES oggd ogg_d oggD ogg_D
+  NAMES oggd ogg_d oggD ogg_D libogg_d
   PATHS $ENV{OGGDIR}
   PATH_SUFFIXES lib
Index: code/branches/kicklib2/cmake/tools/FindVorbis.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/FindVorbis.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/FindVorbis.cmake	(revision 8285)
@@ -22,20 +22,20 @@
 )
 FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
-  NAMES vorbis vorbis-0
+  NAMES vorbis vorbis-0 libvorbis
   PATHS $ENV{VORBISDIR}
   PATH_SUFFIXES lib
 )
 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
-  NAMES vorbisd vorbis_d vorbisD vorbis_D
+  NAMES vorbisd vorbis_d vorbisD vorbis_D libvorbis_d
   PATHS $ENV{VORBISDIR}
   PATH_SUFFIXES lib
 )
 FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
-  NAMES vorbisfile vorbisfile-3
+  NAMES vorbisfile vorbisfile-3 libvorbisfile
   PATHS $ENV{VORBISDIR}
   PATH_SUFFIXES lib
 )
 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
-  NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D
+  NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D libvorbisfile_d
   PATHS $ENV{VORBISDIR}
   PATH_SUFFIXES lib
Index: code/branches/kicklib2/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/branches/kicklib2/cmake/tools/TargetUtilities.cmake	(revision 8284)
+++ code/branches/kicklib2/cmake/tools/TargetUtilities.cmake	(revision 8285)
@@ -53,5 +53,5 @@
  #    This function also installs the target!
  #  Prerequisistes:
- #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES, ORXONOX_CONFIG_FILES_GENERATED
+ #    ORXONOX_DEFAULT_LINK
  #  Parameters:
  #    _target_name, ARGN for the macro arguments
@@ -206,10 +206,4 @@
         SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
       ENDIF()
-      # Also include all config files
-      LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES} ${ORXONOX_CONFIG_FILES_GENERATED})
-      # Add unprocessed config files to the 'Config' section
-      SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
-      # Add generated config files to the 'Generated' section
-      SOURCE_GROUP("Generated" FILES ${ORXONOX_CONFIG_FILES_GENERATED})
     ENDIF()
   ENDIF()
@@ -291,4 +285,13 @@
   IF(_arg_LINK_LIBRARIES)
     TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})
+  ENDIF()
+
+  # RPATH settings for the installation
+  IF(UNIX)
+    SET(_rpath ${LIBRARY_INSTALL_DIRECTORY})
+    IF(_arg_MODULE)
+      LIST(APPEND _rpath ${MODULE_INSTALL_DIRECTORY})
+    ENDIF()
+    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
   ENDIF()
 
