Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2519


Ignore:
Timestamp:
Dec 21, 2008, 11:06:12 PM (15 years ago)
Author:
rgrieder
Message:

It is no more necessary to include UseTolua.cmake just before the invocation of the TOLUA macro.
The include has been moved to src/CMakeLists.txt

Location:
code/branches/buildsystem2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/UseTolua.cmake

    r2510 r2519  
    1616#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    1717
    18 SET(_tolua_executable_name toluaexe_orxonox)
    19 GET_TARGET_PROPERTY(TOLUA_EXECUTABLE "${_tolua_executable_name}" LOCATION)
    2018IF(MINGW_LIBRARY_DIR)
    2119  SET(_tolua_command_wd "WORKING_DIRECTORY;${MINGW_LIBRARY_DIR}/lua-5.1.3/lib")
     
    3230  SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc")
    3331  SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.h")
    34   SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} "${_tolua_cxxfile}")
     32  SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} ${_tolua_cxxfile})
    3533
    3634  # TODO: check secureness of this temporary file
    37   FILE(REMOVE "${_tolua_pkgfile}")
     35  FILE(REMOVE ${_tolua_pkgfile})
    3836  FOREACH(_tolua_inputfile ${_tolua_inputfiles})
    39     FILE(APPEND "${_tolua_pkgfile}" "\$cfile \"${_tolua_inputfile}\"\n")
     37    FILE(APPEND ${_tolua_pkgfile} "\$cfile \"${_tolua_inputfile}\"\n")
    4038  ENDFOREACH(_tolua_inputfile)
    4139
     40  # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt
    4241  ADD_CUSTOM_COMMAND(
    43     OUTPUT "${_tolua_cxxfile}" "${_tolua_hfile}"
    44     COMMAND "${TOLUA_EXECUTABLE}" -n "${_tolua_package}"
    45                                   -w "${CMAKE_CURRENT_SOURCE_DIR}"
    46                                   -o "${_tolua_cxxfile}"
    47                                   -H "${_tolua_hfile}"
    48                                   -s "${TOLUA_PARSER_SOURCE}"
    49                                      "${_tolua_pkgfile}"
    50     DEPENDS "${_tolua_executable_name}" ${TOLUA_PARSER_DEPENDENCIES}
     42    OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}
     43    COMMAND ${TOLUA_PARSER_EXECUTABLE} -n ${_tolua_package}
     44                                       -w ${CMAKE_CURRENT_SOURCE_DIR}
     45                                       -o ${_tolua_cxxfile}
     46                                       -H ${_tolua_hfile}
     47                                       -s ${TOLUA_PARSER_SOURCE}
     48                                          ${_tolua_pkgfile}
     49    DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
    5150    IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
    5251    ${_tolua_command_wd}
  • code/branches/buildsystem2/src/CMakeLists.txt

    r2510 r2519  
    5353ENDIF (WIN32)
    5454
    55 # Include macro to easily add source files in subdirectories
     55# Include macros
    5656INCLUDE(AddSourceFiles)
     57INCLUDE(UseTolua)
    5758
    5859# Our own libraries
  • code/branches/buildsystem2/src/core/CMakeLists.txt

    r2518 r2519  
    4747WRITE_SOURCE_FILES(CORE_SRC_FILES)
    4848
    49 INCLUDE(UseTolua)
    5049TOLUA(Core CORE_SRC_FILES INPUTFILES LuaBind.h CommandExecutor.h)
    5150
  • code/branches/buildsystem2/src/orxonox/CMakeLists.txt

    r2518 r2519  
    1616WRITE_SOURCE_FILES(ORXONOX_SRC_FILES)
    1717
    18 INCLUDE(UseTolua)
    1918TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h)
    2019
  • code/branches/buildsystem2/src/tolua/CMakeLists.txt

    r2510 r2519  
    66  tolua_to.c
    77)
    8 
    9 TARGET_LINK_LIBRARIES(tolualib_orxonox ${LUA_LIBRARIES})
    108
    119#INSTALL(TARGETS tolualib_orxonox LIBRARY DESTINATION lib)
     
    2725ENDIF("${LUA_VERSION}" MATCHES "^5.0")
    2826
     27# Set some variables to the parent scope in order to use them in the TOLUA macro
     28GET_TARGET_PROPERTY(_temp_location toluaexe_orxonox LOCATION)
     29SET(TOLUA_PARSER_EXECUTABLE ${_temp_location} PARENT_SCOPE)
    2930SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" PARENT_SCOPE)
    3031SET(TOLUA_PARSER_DEPENDENCIES
     32  toluaexe_orxonox
    3133  ${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}
    3234  ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
Note: See TracChangeset for help on using the changeset viewer.