Changeset 2608 for code/branches/buildsystem2
- Timestamp:
- Jan 29, 2009, 8:13:22 PM (16 years ago)
- Location:
- code/branches/buildsystem2/src
- Files:
-
- 130 added
- 4 deleted
- 8 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/src/CMakeLists.txt
r2593 r2608 16 16 17 17 # Check whether the required CEGUILua version is even available 18 IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua -${CEGUI_VERSION})18 IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION}) 19 19 MESSAGE(FATAL_ERROR "No matching CEGUILua version shipped with Orxonox (${CEGUI_VERSION})") 20 ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua -${CEGUI_VERSION})20 ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION}) 21 21 22 22 INCLUDE_DIRECTORIES( 23 ceguilua -${CEGUI_VERSION}/ceguilua23 ceguilua/ceguilua-${CEGUI_VERSION}/ceguilua 24 24 cpptcl 25 25 ois … … 45 45 46 46 # External libraries, but copied into the repository 47 ADD_SUBDIRECTORY(ceguilua -${CEGUI_VERSION}/ceguilua)47 ADD_SUBDIRECTORY(ceguilua) 48 48 ADD_SUBDIRECTORY(cpptcl) 49 49 ADD_SUBDIRECTORY(ogreceguirenderer) -
code/branches/buildsystem2/src/ceguilua/CMakeLists.txt
r2604 r2608 1 SET( CEGUILUA_SRC_FILES 2 CEGUILua.cpp 3 CEGUILuaFunctor.cpp 4 lua_CEGUI.cpp 5 required.cpp 1 SET(CEGUILUA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua-${CEGUI_VERSION}/ceguilua) 2 SET(CEGUILUA_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) 3 4 SET(CEGUILUA_FILES 5 ${CEGUILUA_DIR}/CEGUILua.cpp 6 ${CEGUILUA_DIR}/CEGUILuaFunctor.cpp 7 ${CEGUILUA_DIR}/required.cpp 8 ${CEGUILUA_BINARY_DIR}/lua_CEGUI.cpp 9 10 ${CEGUILUA_DIR}/CEGUILua.h 11 ${CEGUILUA_DIR}/CEGUILuaFunctor.h 12 ${CEGUILUA_DIR}/required.h 6 13 ) 7 14 8 ADD_CXX_FLAGS("-wd4996" MSVC)15 INCLUDE(CompareVersionStrings) 9 16 10 ADD_LIBRARY( ceguilua_orxonox SHARED ${CEGUILUA_SRC_FILES} ) 17 # Copy package files incrementally until the version is met 18 SET(CEGUILUA_VERSIONS 0.5.0 0.6.0 0.6.1 0.6.2) 19 FOREACH(_version ${CEGUILUA_VERSIONS}) 20 COMPARE_VERSION_STRINGS(${_version} ${CEGUI_VERSION} _compare_result) 21 IF(_compare_result EQUAL 1) 22 BREAK() # _version > CEGUI_VERSION 23 ENDIF(_compare_result EQUAL 1) 24 ADD_SUBDIRECTORY(ceguilua-${_version}) 25 ENDFOREACH(_version) 11 26 27 # Create the tolua bind file. We could use the orignal file though, but it is 1.6MB... 28 ADD_CUSTOM_COMMAND( 29 OUTPUT ${CEGUILUA_BINARY_DIR}/lua_CEGUI.cpp 30 COMMAND toluaexe_orxonox -n CEGUI 31 -w ${CEGUILUA_BINARY_DIR} 32 -o lua_CEGUI.cpp 33 -L exceptions.lua 34 -s ${TOLUA_PARSER_SOURCE} 35 CEGUI.pkg 36 DEPENDS ${TOLUA_PARSER_DEPENDENCIES} 37 WORKING_DIRECTORY ${ORXONOX_LIBRARY_BIN_DIR} 38 COMMENT "Generating tolua bind files for package CEGUILua" 39 ) 40 41 ADD_CXX_FLAGS("-w44996" MSVC) 42 43 ADD_LIBRARY(ceguilua_orxonox SHARED ${CEGUILUA_FILES}) 12 44 SET_TARGET_PROPERTIES(ceguilua_orxonox PROPERTIES DEFINE_SYMBOL "CEGUILUA_EXPORTS") 13 45 TARGET_LINK_LIBRARIES(ceguilua_orxonox -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/ceguilua/CEGUILua.cpp
r2509 r2608 41 41 } 42 42 43 #include "tolua ++.h"43 #include "tolua/tolua++.h" 44 44 45 45 // prototype for bindings initialisation function … … 56 56 LuaScriptModule::LuaScriptModule() 57 57 { 58 #if LUA_VERSION_NUM >= 501 59 static const luaL_Reg lualibs[] = { 60 {"", luaopen_base}, 61 {LUA_LOADLIBNAME, luaopen_package}, 62 {LUA_TABLIBNAME, luaopen_table}, 63 {LUA_IOLIBNAME, luaopen_io}, 64 {LUA_OSLIBNAME, luaopen_os}, 65 {LUA_STRLIBNAME, luaopen_string}, 66 {LUA_MATHLIBNAME, luaopen_math}, 67 #if defined(DEBUG) || defined (_DEBUG) 68 {LUA_DBLIBNAME, luaopen_debug}, 69 #endif 70 {0, 0} 71 }; 72 #endif /* LUA_VERSION_NUM >= 501 */ 73 58 74 // create a lua state 59 75 d_ownsState = true; … … 61 77 62 78 // init all standard libraries 63 luaopen_base(d_state); 64 luaopen_io(d_state); 65 luaopen_string(d_state); 66 luaopen_table(d_state); 67 luaopen_math(d_state); 68 #if defined(DEBUG) || defined (_DEBUG) 69 luaopen_debug(d_state); 70 #endif 79 #if LUA_VERSION_NUM >= 501 80 const luaL_Reg *lib = lualibs; 81 for (; lib->func; lib++) 82 { 83 lua_pushcfunction(d_state, lib->func); 84 lua_pushstring(d_state, lib->name); 85 lua_call(d_state, 1, 0); 86 } 87 #else /* LUA_VERSION_NUM >= 501 */ 88 luaopen_base(d_state); 89 luaopen_io(d_state); 90 luaopen_string(d_state); 91 luaopen_table(d_state); 92 luaopen_math(d_state); 93 #if defined(DEBUG) || defined (_DEBUG) 94 luaopen_debug(d_state); 95 #endif 96 #endif /* LUA_VERSION_NUM >= 501 */ 71 97 72 98 setModuleIdentifierString(); -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/ceguilua/CEGUILua.h
r2509 r2608 32 32 33 33 34 /*** CHANGES BY ORXONOX TEAM FOR MINGW32 ***/35 34 /************************************************************************* 36 35 Import / Export control macros 37 36 *************************************************************************/ 38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)37 #if defined( __WIN32__ ) || defined( _WIN32 ) 39 38 # ifdef CEGUILUA_EXPORTS 40 39 # define CEGUILUA_API __declspec(dllexport) 41 40 # else 42 # if defined( __MINGW32__ )43 # define CEGUILUA_API44 # else45 # define CEGUILUA_API __declspec(dllimport)46 # endif41 # if defined( __MINGW32__ ) 42 # define CEGUILUA_API 43 # else 44 # define CEGUILUA_API __declspec(dllimport) 45 # endif 47 46 # endif 48 47 #else -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/ceguilua/CEGUILuaFunctor.cpp
r2509 r2608 40 40 } 41 41 42 #include "tolua ++.h"42 #include "tolua/tolua++.h" 43 43 44 44 // Start of CEGUI namespace section -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/ceguilua/required.h
r2509 r2608 36 36 #define __operator_decrement operator-- 37 37 #define __operator_dereference operator* 38 39 //This is used to keep compilers happy 40 #define CEGUIDeadException(e) & 38 41 39 42 #define LuaFunctorSubscribeEvent CEGUI::LuaFunctor::SubscribeEvent -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.6.1/ceguilua/CEGUILua.cpp
r2509 r2608 28 28 * OTHER DEALINGS IN THE SOFTWARE. 29 29 ***************************************************************************/ 30 #ifdef HAVE_CONFIG_H31 # include "config.h"32 #endif33 34 30 #include "CEGUI.h" 35 31 #include "CEGUIConfig.h" … … 46 42 } 47 43 48 #include "tolua ++.h"44 #include "tolua/tolua++.h" 49 45 50 46 // prototype for bindings initialisation function … … 75 71 {0, 0} 76 72 }; 77 #endif /* CEGUI_LUA_VER >= 51 */73 #endif /* LUA_VERSION_NUM >= 501 */ 78 74 79 75 // create a lua state … … 90 86 lua_call(d_state, 1, 0); 91 87 } 92 #else /* CEGUI_LUA_VER >= 51 */88 #else /* LUA_VERSION_NUM >= 501 */ 93 89 luaopen_base(d_state); 94 90 luaopen_io(d_state); … … 99 95 luaopen_debug(d_state); 100 96 #endif 101 #endif /* CEGUI_LUA_VER >= 51 */97 #endif /* LUA_VERSION_NUM >= 501 */ 102 98 103 99 setModuleIdentifierString(); -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.6.1/ceguilua/CEGUILua.h
r1848 r2608 31 31 #define _CEGUILua_h_ 32 32 33 /*** CHANGES BY ORXONOX TEAM FOR MINGW32 ***/ 33 34 34 /************************************************************************* 35 35 Import / Export control macros … … 39 39 # define CEGUILUA_API __declspec(dllexport) 40 40 # else 41 # if defined( __MINGW32__ )42 # define CEGUILUA_API43 # else44 # define CEGUILUA_API __declspec(dllimport)45 # endif41 # if defined( __MINGW32__ ) 42 # define CEGUILUA_API 43 # else 44 # define CEGUILUA_API __declspec(dllimport) 45 # endif 46 46 # endif 47 47 #else -
code/branches/buildsystem2/src/ceguilua/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp
r2509 r2608 40 40 } 41 41 42 #include "tolua ++.h"42 #include "tolua/tolua++.h" 43 43 44 44 // Start of CEGUI namespace section
Note: See TracChangeset
for help on using the changeset viewer.