Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 5, 2008, 12:04:16 AM (16 years ago)
Author:
adrfried
Message:

out-of-source-builds working in basics

Location:
code/branches/buildsystem
Files:
1 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/CMakeLists.txt

    r1874 r1882  
    4444
    4545# Set binary output directories
    46 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
    47 SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
     46SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
     47SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin/lib)
    4848
    4949# Global compiler/linker flags. force -O2!
  • code/branches/buildsystem/src/CMakeLists.txt

    r1854 r1882  
    22INCLUDE_DIRECTORIES(..)
    33INCLUDE_DIRECTORIES(orxonox)
     4INCLUDE_DIRECTORIES(lua)
    45
    56ADD_SUBDIRECTORY(cpptcl)
  • code/branches/buildsystem/src/core/CMakeLists.txt

    r1844 r1882  
    5050  input/KeyDetector.cc
    5151  input/SimpleInputState.cc
    52 
    53   tolua/tolua_bind.cc
    5452)
    5553
    56 GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION)
    57 ADD_CUSTOM_COMMAND(
    58   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.cc ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.h
    59   COMMAND ${TOLUA_EXE} -n Core -o ../../src/core/tolua/tolua_bind.cc -H ../../src/core/tolua/tolua_bind.h ../../src/core/tolua/tolua.pkg
    60   DEPENDS
    61     tolua_orxonox
    62     tolua/tolua.pkg
    63     Script.h
    64     CommandExecutor.h
    65   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
    66 )
     54INCLUDE(UseTolua)
     55TOLUA(Core CORE_SRC_FILES INPUTFILES Script.h CommandExecutor.h)
    6756
    6857ADD_LIBRARY(core SHARED ${CORE_SRC_FILES})
  • code/branches/buildsystem/src/core/Script.cc

    r1810 r1882  
    3636#include "lua/lua.hpp"
    3737
    38 #include "tolua/tolua++.h"
    39 #include "tolua/tolua_bind.h"
     38#include "tolua++.h"
     39#include "tolua_bind.h"
    4040
    4141namespace orxonox
  • code/branches/buildsystem/src/orxonox/CMakeLists.txt

    r1844 r1882  
    6262  objects/RotatingProjectile.cc
    6363  objects/ParticleProjectile.cc
    64 
    65   tolua/tolua_bind.cc
    6664)
    6765
    68 GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION)
    69 ADD_CUSTOM_COMMAND(
    70   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.cc ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.h
    71   COMMAND ${TOLUA_EXE} -n Orxonox -o ../../src/orxonox/tolua/tolua_bind.cc -H ../../src/orxonox/tolua/tolua_bind.h ../../src/orxonox/tolua/tolua.pkg
    72   DEPENDS
    73     tolua_orxonox
    74     tolua/tolua.pkg
    75     gui/GUIManager.h
    76   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
    77 )
    78        
     66INCLUDE(UseTolua)
     67TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h)
     68
     69SET(CORE_SUBDIR src/core)
     70SET(CORE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/${CORE_SUBDIR}")
     71SET(CORE_BINARY_DIR "${CMAKE_BINARY_DIR}/${CORE_SUBDIR}")
     72SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -iquote ${CORE_SOURCE_DIR} -iquote ${CORE_BINARY_DIR}")
     73SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -iquote ${CORE_SOURCE_DIR} -iquote ${CORE_BINARY_DIR}")
     74
    7975ADD_EXECUTABLE( orxonox ${ORXONOX_SRC_FILES} )
    8076
     
    110106  network
    111107)
    112 
  • code/branches/buildsystem/src/orxonox/gui/GUIManager.cc

    r1810 r1882  
    4343#include "core/input/InputManager.h"
    4444#include "core/input/SimpleInputState.h"
    45 #include "core/tolua/tolua_bind.h"
     45#include "../core/tolua_bind.h"
    4646#include "core/ConsoleCommand.h"
    4747#include "core/Core.h"
    48 #include "tolua/tolua_bind.h"
     48#include "tolua_bind.h"
    4949#include "GraphicsEngine.h"
    5050#include "OgreCEGUIRenderer.h"
  • code/branches/buildsystem/src/tolua/CMakeLists.txt

    r1815 r1882  
    2828
    2929
    30 SET (TOLUA_PACKAGE "../../src/tolua/tolua-5.1.pkg")
     30SET (TOLUA_PACKAGE "${CMAKE_CURRENT_SOURCE_DIR}/tolua-5.1.pkg")
    3131GET_TARGET_PROPERTY(TOLUAGEN_EXE toluagen_orxonox LOCATION)
    3232ADD_CUSTOM_COMMAND(
    33   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/toluabind_orxonox.c
    34   COMMAND ${TOLUAGEN_EXE} -n tolua -o ../../src/tolua/toluabind_orxonox.c -H ../../src/tolua/toluabind_orxonox.h ${TOLUA_PACKAGE}
     33  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.c
     34  COMMAND ${TOLUAGEN_EXE} -n tolua -o ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.c -H ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.h ${TOLUA_PACKAGE}
    3535  DEPENDS
    3636    toluagen_orxonox
     
    5757    lua/clean.lua
    5858    lua/doit.lua
    59   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
     59    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    6060)
    6161
  • code/branches/buildsystem/src/tolua/lua/package.lua

    r1810 r1882  
    213213
    214214 if not flags.h then
    215   output('#include "../'..self.name..'Prereqs.h"\n')
     215  output('#include "'..self.name..'Prereqs.h"\n')
    216216  output('/* Exported function */')
    217217  output('_'..self.name..'Export int  tolua_'..self.name..'_open (lua_State* tolua_S);')
  • code/branches/buildsystem/src/tolua/tolua-5.1.pkg

    r1810 r1882  
    1 $lfile "../../src/tolua/lua/compat-5.1.lua"
    2 $lfile "../../src/tolua/lua/compat.lua"
    3 $lfile "../../src/tolua/lua/basic.lua"
    4 $lfile "../../src/tolua/lua/feature.lua"
    5 $lfile "../../src/tolua/lua/verbatim.lua"
    6 $lfile "../../src/tolua/lua/code.lua"
    7 $lfile "../../src/tolua/lua/typedef.lua"
    8 $lfile "../../src/tolua/lua/container.lua"
    9 $lfile "../../src/tolua/lua/package.lua"
    10 $lfile "../../src/tolua/lua/module.lua"
    11 $lfile "../../src/tolua/lua/namespace.lua"
    12 $lfile "../../src/tolua/lua/define.lua"
    13 $lfile "../../src/tolua/lua/enumerate.lua"
    14 $lfile "../../src/tolua/lua/declaration.lua"
    15 $lfile "../../src/tolua/lua/variable.lua"
    16 $lfile "../../src/tolua/lua/array.lua"
    17 $lfile "../../src/tolua/lua/function.lua"
    18 $lfile "../../src/tolua/lua/operator.lua"
    19 $lfile "../../src/tolua/lua/class.lua"
    20 $lfile "../../src/tolua/lua/clean.lua"
    21 $lfile "../../src/tolua/lua/doit.lua"
     1$lfile "lua/compat-5.1.lua"
     2$lfile "lua/compat.lua"
     3$lfile "lua/basic.lua"
     4$lfile "lua/feature.lua"
     5$lfile "lua/verbatim.lua"
     6$lfile "lua/code.lua"
     7$lfile "lua/typedef.lua"
     8$lfile "lua/container.lua"
     9$lfile "lua/package.lua"
     10$lfile "lua/module.lua"
     11$lfile "lua/namespace.lua"
     12$lfile "lua/define.lua"
     13$lfile "lua/enumerate.lua"
     14$lfile "lua/declaration.lua"
     15$lfile "lua/variable.lua"
     16$lfile "lua/array.lua"
     17$lfile "lua/function.lua"
     18$lfile "lua/operator.lua"
     19$lfile "lua/class.lua"
     20$lfile "lua/clean.lua"
     21$lfile "lua/doit.lua"
    2222
    2323$[
Note: See TracChangeset for help on using the changeset viewer.