Index: code/branches/buildsystem/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/CMakeLists.txt	(revision 1978)
+++ code/branches/buildsystem/CMakeLists.txt	(revision 1979)
@@ -73,8 +73,12 @@
 FIND_PACKAGE(OggVorbis REQUIRED)
 FIND_PACKAGE(ZLIB REQUIRED)
-FIND_PACKAGE(Lua50 REQUIRED)
 FIND_PACKAGE(TCL REQUIRED)
 FIND_PACKAGE(DirectX REQUIRED)
 
+FIND_PACKAGE(Lua51)
+IF(NOT LUA_FOUND)
+  FIND_PACKAGE(Lua50 REQUIRED)
+ENDIF(NOT LUA_FOUND)
+
 # Add main source dir
 ADD_SUBDIRECTORY(src)
Index: code/branches/buildsystem/src/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/src/CMakeLists.txt	(revision 1978)
+++ code/branches/buildsystem/src/CMakeLists.txt	(revision 1979)
@@ -33,4 +33,5 @@
   ois
   orxonox
+  tolua
 )
 
@@ -47,16 +48,16 @@
 # So first, find out what CEGUI version we have.
 
-#IF (WIN32)
-#    ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)
-#    INCLUDE_DIRECTORIES(ceguilua-0.6.1)
-#ELSE (WIN32)
-#    IF (${CEGUI_VERSION} LESS 0.6.0)
-#        ADD_SUBDIRECTORY(ceguilua-0.5.0b/ceguilua)
-#        INCLUDE_DIRECTORIES(ceguilua-0.5.0b)
-#    ELSE (${CEGUI_VERSION} LESS 0.6.0)
-#        ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)
-#        INCLUDE_DIRECTORIES(ceguilua-0.6.1)
-#    ENDIF (${CEGUI_VERSION} LESS 0.6.0)
-#ENDIF (WIN32)
+IF (WIN32)
+    ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)
+    INCLUDE_DIRECTORIES(ceguilua-0.6.1)
+ELSE (WIN32)
+    IF (${CEGUI_VERSION} LESS 0.6.0)
+        ADD_SUBDIRECTORY(ceguilua-0.5.0b/ceguilua)
+        INCLUDE_DIRECTORIES(ceguilua-0.5.0b)
+    ELSE (${CEGUI_VERSION} LESS 0.6.0)
+        ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)
+        INCLUDE_DIRECTORIES(ceguilua-0.6.1)
+    ENDIF (${CEGUI_VERSION} LESS 0.6.0)
+ENDIF (WIN32)
 
 # Our own libraries
Index: code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILua.cpp
===================================================================
--- code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILua.cpp	(revision 1978)
+++ code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILua.cpp	(revision 1979)
@@ -35,6 +35,6 @@
 
 // include Lua libs and tolua++
-#include "lua/lua.hpp"
-#include "tolua/tolua++.h"
+#include "lua.hpp"
+#include "tolua++.h"
 
 // prototype for bindings initialisation function
Index: code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILuaFunctor.cpp
===================================================================
--- code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILuaFunctor.cpp	(revision 1978)
+++ code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CEGUILuaFunctor.cpp	(revision 1979)
@@ -34,6 +34,6 @@
 
 // include Lua libs and tolua++
-#include "lua/lua.hpp"
-#include "tolua/tolua++.h"
+#include "lua.hpp"
+#include "tolua++.h"
 
 // Start of CEGUI namespace section
Index: code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CMakeLists.txt	(revision 1978)
+++ code/branches/buildsystem/src/ceguilua-0.5.0b/ceguilua/CMakeLists.txt	(revision 1979)
@@ -9,6 +9,6 @@
 
 TARGET_LINK_LIBRARIES(ceguilua_orxonox
-  lua_orxonox
   tolualib_orxonox
+  ${LUA_LIBRARIES}
   ${CEGUI_LIBRARIES}
 )
Index: code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt	(revision 1978)
+++ code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt	(revision 1979)
@@ -9,6 +9,6 @@
 
 TARGET_LINK_LIBRARIES(ceguilua_orxonox
-  lua_orxonox
   tolualib_orxonox
+  ${LUA_LIBRARIES}
   ${CEGUI_LIBRARIES}
 )
Index: code/branches/buildsystem/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/src/orxonox/CMakeLists.txt	(revision 1978)
+++ code/branches/buildsystem/src/orxonox/CMakeLists.txt	(revision 1979)
@@ -94,6 +94,6 @@
   ${CEGUI_LIBRARIES}
   ${LUA_LIBRARIES}
-  # TODO: write include file for this
-  CEGUILuaScriptModule
+  #${CEGUI_SCRIPT_LIBRARIES}
+  ceguilua_orxonox
   tinyxml_orxonox
   tolualib_orxonox
