Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1076 for code/trunk


Ignore:
Timestamp:
Apr 16, 2008, 10:05:37 AM (17 years ago)
Author:
rgrieder
Message:

two hours of Fuk is very 'enlighting', the whole thing works now.\ncmake. will now build lua, then compile with tolua and finally create the Makefiles for orxonox.\n

Location:
code/trunk
Files:
5 added
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/CMakeLists.txt

    r1071 r1076  
    5555# FIND_PACKAGE(CEGUI_OGRE)
    5656FIND_PACKAGE(ENet)
    57 FIND_PACKAGE(Boost REQUIRED thread)
     57FIND_PACKAGE(Boost)
    5858FIND_PACKAGE(OpenAL)
    5959FIND_PACKAGE(ALUT)
     
    7070  ${Boost_LIBRARY_DIRS}
    7171  ${Zlib_LIBRARY_DIR}
    72   ${Lua_LIBRARIES}
    73 #  core objects loader network weapon classHierarchy audio
    7472)
    7573
     
    8179  ${ENet_INCLUDE_DIR}
    8280  ${Boost_INCLUDE_DIRS}
    83 #  ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR}
     81  ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR}
    8482  ${Lua_INCLUDE_DIR}
    8583)
     
    8886################ Source files ###################
    8987
     88#At first, build lua
     89MESSAGE(STATUS "\n******************* Building tolua... ******************\n\n")
     90EXECUTE_PROCESS(COMMAND ./tolua-build)
     91MESSAGE(STATUS "\n\n******************* Building tolua done ****************\n")
     92
     93#generate lua bind source files
     94EXECUTE_PROCESS(COMMAND bin/./tolua-exec-script)
     95EXECUTE_PROCESS(COMMAND ls)
     96
    9097#add main source dir
    9198ADD_SUBDIRECTORY(src)
     99
  • code/trunk/cmake/FindLua.cmake

    r1037 r1076  
    1111# Redistribution and use is allowed according to the terms of the BSD license.
    1212
     13MESSAGE(STATUS "lua libs in cache: ${Lua_LIBRARIES}")
    1314IF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
    1415    SET(Lua_FIND_QUIETLY TRUE) # Already in cache, be silent
     
    2627
    2728IF (NOT Lua_INCLUDE_DIR)
    28 FIND_PATH(Lua_INCLUDE_DIR lua.h
     29 FIND_PATH(Lua_INCLUDE_DIR lua.h
    2930        /usr/include/lua50
    3031        /usr/local/include/lua50
     
    3334
    3435IF (NOT Lua_LIBRARIES)
    35 FIND_LIBRARY(Lua_LIBRARIES lua50
     36 FIND_LIBRARY(Lua_LIBRARIES lua50
    3637        /usr/lib
    3738        /usr/local/lib)
    3839
    39 FIND_LIBRARY(Lua_LIBRARY lualib50
     40 FIND_LIBRARY(Lua_LIBRARY lualib50
    4041        /usr/lib
    4142        /usr/local/lib)
    4243
    43 SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
    44 
     44#SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
    4545ENDIF (NOT Lua_LIBRARIES)
    4646
     47#especially for tardis
    4748IF (NOT Lua_LIBRARIES)
    48 FIND_LIBRARY(Lua_LIBRARIES lua
     49 FIND_LIBRARY(Lua_LIBRARIES lua
    4950        /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)
    5051
    51 FIND_LIBRARY(Lua_LIBRARY lualib
     52 FIND_LIBRARY(Lua_LIBRARY lualib
    5253        /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)
    5354
    54 SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
    55 
     55#SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
    5656ENDIF (NOT Lua_LIBRARIES)
    5757
     
    6262IF (Lua_FOUND)
    6363    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")
     64    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARY}")
    6465ELSE (Lua_FOUND)
    6566    IF (Lua_FIND_REQUIRED)
  • code/trunk/src/CMakeLists.txt

    r1055 r1076  
    11INCLUDE_DIRECTORIES(.)
    22INCLUDE_DIRECTORIES(orxonox)
     3INCLUDE_DIRECTORIES(util/tolua)
    34
    45ADD_SUBDIRECTORY(util)
  • code/trunk/src/core/CMakeLists.txt

    r1070 r1076  
     1#get the created files
     2AUX_SOURCE_DIRECTORY(tolua TOLUA_BIND_FILES)
     3
     4MESSAGE(STATUS "tolua sources: ${TOLUA_BIND_FILES}")
     5
    16SET( CORE_SRC_FILES
    27  OrxonoxClass.cc
     
    2631  Tickable.cc
    2732  Script.cc
    28   ToLuaBind.cc
     33  ${TOLUA_BIND_FILES}
    2934)
    3035
     
    3439  util
    3540  ${Lua_LIBRARIES}
     41  ${Lua_LIBRARY}
    3642  ${OIS_LIBRARIES}
    3743)
  • code/trunk/src/core/Script.cc

    r1056 r1076  
    3939}
    4040
    41 #include "util/tolua/tolua++.h"
    42 #include "ToLuaBind.h"
     41#include "tolua++.h"
     42#include "tolua/tolua_bind.h"
    4343
    4444namespace orxonox
  • code/trunk/src/util/CMakeLists.txt

    r1073 r1076  
    11AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES)
     2AUX_SOURCE_DIRECTORY(tolua   TOLUA_SRC_FILES)
    23
    34SET (UTIL_SRC_FILES
     
    1112  MultiTypeMath.cc
    1213  ${TINYXML_SRC_FILES}
     14  ${TOLUA_SRC_FILES}
    1315)
    1416
     
    2123TARGET_LINK_LIBRARIES( util
    2224  ${OGRE_LIBRARIES}
    23 )
     25  ${Lua_LIBRARIES}
     26  ${Lua_LIBRARY}
     27)
     28
  • code/trunk/src/util/tolua/CMakeLists.txt

    r1075 r1076  
    22
    33#This sets where to look for modules (e.g. "Find*.cmake" files)
    4 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
     4SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/)
    55
    66#Check whether we are on a tardis box
     
    1717
    1818#set binary output directories
    19 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
    20 SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin/lib)
     19SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../../../bin)
     20SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/../../../bin)
    2121
    2222# global compiler/linker flags. force -O2!
     
    3939#Set the search paths for the linking
    4040LINK_DIRECTORIES(
    41   ${Lua_LIBRARIES}
    42   m
    4341)
    4442
     
    6563TARGET_LINK_LIBRARIES( tolua
    6664  ${Lua_LIBRARIES}
     65  ${Lua_LIBRARY}
     66  m
    6767)
Note: See TracChangeset for help on using the changeset viewer.