Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 29, 2009, 11:35:54 PM (15 years ago)
Author:
rgrieder
Message:

This commit gets a little ugly, couldn't separate that anymore:

  • Renamed UseTolua.cmake to GenerateLuaBindings.cmake
  • Applied the macros for compiler flags, linker flags, header files and source groups Updated the whole build tree for that
  • Created real compiler config scripts (BuildConfigGCC.cmake and BuildConfigMSVC.cmake)
  • Large scale clean up in BuildConfig.cmake
  • You can now specify your own LibraryConfig and BuildConfig script via CMake Cache
  • Lots of small changes and fixes
File:
1 moved

Legend:

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

    r2618 r2621  
    1616#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    1717
    18 MACRO(TOLUA _tolua_package _tolua_srcfiles_varname)
    19   # TODO: cleaner arguments handling
     18FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files)
    2019  SET(_tolua_inputfiles ${ARGN})
    2120  LIST(REMOVE_ITEM _tolua_inputfiles "INPUTFILES")
     
    2423  SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc")
    2524  SET(_tolua_hfile   "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.h")
    26   SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} ${_tolua_cxxfile})
    2725
    28   # TODO: check secureness of this temporary file
     26  SET(${_target_source_files}
     27    ${${_target_source_files}}
     28    ${_tolua_cxxfile}
     29    ${_tolua_hfile}
     30    PARENT_SCOPE
     31  )
     32  SOURCE_GROUP("Tolua" FILES ${_tolua_cxxfile} ${_tolua_hfile})
     33
     34  # Create temporary package file
    2935  FILE(REMOVE ${_tolua_pkgfile})
    3036  FOREACH(_tolua_inputfile ${_tolua_inputfiles})
     
    3238  ENDFOREACH(_tolua_inputfile)
    3339
    34   # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt
    35   #       or in the platform config
    3640  ADD_CUSTOM_COMMAND(
    3741    OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}
    38     COMMAND toluaexe_orxonox -n ${_tolua_package}
    39                              -w ${CMAKE_CURRENT_SOURCE_DIR}
    40                              -o ${_tolua_cxxfile}
    41                              -H ${_tolua_hfile}
    42                              -s ${TOLUA_PARSER_SOURCE}
    43                                 ${_tolua_pkgfile}
     42    COMMAND tolua++app_orxonox -n ${_tolua_package}
     43                               -w ${CMAKE_CURRENT_SOURCE_DIR}
     44                               -o ${_tolua_cxxfile}
     45                               -H ${_tolua_hfile}
     46                               -s ${TOLUA_PARSER_SOURCE}
     47                                  ${_tolua_pkgfile}
    4448    DEPENDS              ${TOLUA_PARSER_DEPENDENCIES}
    4549    IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
    46     WORKING_DIRECTORY    ${ORXONOX_LIBRARY_BIN_DIR}
     50    WORKING_DIRECTORY    ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
    4751    COMMENT "Generating tolua bind files for package ${_tolua_package}"
    4852  )
    49 ENDMACRO(TOLUA)
     53ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
Note: See TracChangeset for help on using the changeset viewer.