- Timestamp:
- Mar 29, 2008, 5:20:08 PM (17 years ago)
- Location:
- code/branches/script
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/script/cmake/FindLua.cmake
r946 r954 19 19 /usr/local/include/lua5.1) 20 20 21 FIND_PATH(Lua_INCLUDE_DIR lauxlib.h 22 /usr/include/lua5.1 23 /usr/local/include/lua5.1) 24 25 FIND_PATH(Lua_INCLUDE_DIR lualib.h 26 /usr/include/lua5.1 27 /usr/local/include/lua5.1) 28 29 FIND_LIBRARY(Lua_LIBRARIES lua5.1 PATH 21 FIND_LIBRARY(Lua_LIBRARIES lua5.1 30 22 /usr/lib 31 23 /usr/local/lib) 32 24 25 ADD_DEFINITIONS(-DLUA_VERSION=51) 26 27 IF (NOT Lua_LIBRARIES AND Lua_INCLUDE_DIR) 28 FIND_PATH(Lua_INCLUDE_DIR lua.h 29 /usr/include/lua50 30 /usr/local/include/lua50 31 /usr/pack/lua-5.0.3-sd/include/) 32 33 FIND_LIBRARY(Lua_LIBRARIES lua50 34 /usr/lib 35 /usr/local/lib 36 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib/) 37 38 FIND_LIBRARY(Lua_LIBRARY lualib50 39 /usr/lib 40 /usr/local/lib 41 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib/) 42 43 SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY}) 44 ADD_DEFINITIONS(-DLUA_VERSION=50) 45 46 ENDIF (NOT Lua_LIBRARIES AND Lua_INCLUDE_DIR) 33 47 34 48 IF (Lua_INCLUDE_DIR AND Lua_LIBRARIES) -
code/branches/script/src/orxonox/script/Script.cc
r946 r954 27 27 28 28 #include "Script.h" 29 //#include <lua.h> 30 #include <lualib.h> 31 #include <lauxlib.h> 29 extern "C" { 30 #include "lualib.h" 31 #include "lauxlib.h" 32 } 32 33 33 34 … … 37 38 { 38 39 state_ = lua_open(); 39 40 #if Lua_VERSION == 51 40 41 luaL_openlibs(state_); 42 #else 43 luaopen_base(state_); 44 luaopen_table(state_); 45 luaopen_io(state_); 46 luaopen_string(state_); 47 luaopen_math(state_); 48 luaopen_debug(state_); 49 #endif 41 50 } 42 51 -
code/branches/script/src/orxonox/script/Script.h
r946 r954 8 8 #define _Script_H__ 9 9 10 #include <lua.h> 10 extern "C" { 11 #include "lua.h" 12 } 11 13 12 14 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.