Index: code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILua.cpp
===================================================================
--- code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILua.cpp	(revision 1803)
+++ code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILua.cpp	(revision 1804)
@@ -28,7 +28,4 @@
  *   OTHER DEALINGS IN THE SOFTWARE.
  ***************************************************************************/
-#ifdef HAVE_CONFIG_H
-#   include "config.h"
-#endif
 
 #include "CEGUI.h"
@@ -40,11 +37,6 @@
 
 // include Lua libs and tolua++
-extern "C" {
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-}
-
-#include "tolua++.h"
+#include "lua/lua.hpp"
+#include "tolua/tolua++.h"
 
 // prototype for bindings initialisation function
@@ -61,19 +53,17 @@
 LuaScriptModule::LuaScriptModule()
 {
-    #if CEGUI_LUA_VER >= 51
-        static const luaL_Reg lualibs[] = {
-            {"", luaopen_base},
-            {LUA_LOADLIBNAME, luaopen_package},
-            {LUA_TABLIBNAME, luaopen_table},
-            {LUA_IOLIBNAME, luaopen_io},
-            {LUA_OSLIBNAME, luaopen_os},
-            {LUA_STRLIBNAME, luaopen_string},
-            {LUA_MATHLIBNAME, luaopen_math},
-        #if defined(DEBUG) || defined (_DEBUG)
-                {LUA_DBLIBNAME, luaopen_debug},
-        #endif
-            {0, 0}
-        };
-    #endif /* CEGUI_LUA_VER >= 51 */
+    static const luaL_Reg lualibs[] = {
+        {"", luaopen_base},
+        {LUA_LOADLIBNAME, luaopen_package},
+        {LUA_TABLIBNAME, luaopen_table},
+        {LUA_IOLIBNAME, luaopen_io},
+        {LUA_OSLIBNAME, luaopen_os},
+        {LUA_STRLIBNAME, luaopen_string},
+        {LUA_MATHLIBNAME, luaopen_math},
+    #if defined(DEBUG) || defined (_DEBUG)
+        {LUA_DBLIBNAME, luaopen_debug},
+    #endif
+        {0, 0}
+    };
 
     // create a lua state
@@ -82,22 +72,11 @@
 
     // init all standard libraries
-    #if CEGUI_LUA_VER >= 51
-            const luaL_Reg *lib = lualibs;
-            for (; lib->func; lib++)
-            {
-                lua_pushcfunction(d_state, lib->func);
-                lua_pushstring(d_state, lib->name);
-                lua_call(d_state, 1, 0);
-            }
-    #else /* CEGUI_LUA_VER >= 51 */
-        luaopen_base(d_state);
-        luaopen_io(d_state);
-        luaopen_string(d_state);
-        luaopen_table(d_state);
-        luaopen_math(d_state);
-        #if defined(DEBUG) || defined (_DEBUG)
-            luaopen_debug(d_state);
-        #endif
-    #endif /* CEGUI_LUA_VER >= 51 */
+    const luaL_Reg *lib = lualibs;
+    for (; lib->func; lib++)
+    {
+        lua_pushcfunction(d_state, lib->func);
+        lua_pushstring(d_state, lib->name);
+        lua_call(d_state, 1, 0);
+    }
 
     setModuleIdentifierString();
Index: code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp
===================================================================
--- code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp	(revision 1803)
+++ code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp	(revision 1804)
@@ -34,11 +34,6 @@
 
 // include Lua libs and tolua++
-extern "C" {
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-}
-
-#include "tolua++.h"
+#include "lua/lua.hpp"
+#include "tolua/tolua++.h"
 
 // Start of CEGUI namespace section
Index: code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt
===================================================================
--- code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt	(revision 1803)
+++ code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt	(revision 1804)
@@ -9,2 +9,4 @@
 
 ADD_LIBRARY( ceguilua_orxonox SHARED ${LUA_SRC_FILES} )
+
+TARGET_LINK_LIBRARIES( ceguilua_orxonox lua_orxonox )
Index: code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/lua_CEGUI.cpp
===================================================================
--- code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/lua_CEGUI.cpp	(revision 1803)
+++ code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/lua_CEGUI.cpp	(revision 1804)
@@ -9,5 +9,5 @@
 #include "string.h"
 
-#include "tolua++.h"
+#include "tolua/tolua++.h"
 
 /* Exported function */
