- Timestamp:
- Jan 29, 2009, 11:35:54 PM (15 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/GenerateToluaBindings.cmake
r2618 r2621 16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 17 17 18 MACRO(TOLUA _tolua_package _tolua_srcfiles_varname) 19 # TODO: cleaner arguments handling 18 FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files) 20 19 SET(_tolua_inputfiles ${ARGN}) 21 20 LIST(REMOVE_ITEM _tolua_inputfiles "INPUTFILES") … … 24 23 SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc") 25 24 SET(_tolua_hfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.h") 26 SET(${_tolua_srcfiles_varname} ${${_tolua_srcfiles_varname}} ${_tolua_cxxfile})27 25 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 29 35 FILE(REMOVE ${_tolua_pkgfile}) 30 36 FOREACH(_tolua_inputfile ${_tolua_inputfiles}) … … 32 38 ENDFOREACH(_tolua_inputfile) 33 39 34 # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt35 # or in the platform config36 40 ADD_CUSTOM_COMMAND( 37 41 OUTPUT ${_tolua_cxxfile} ${_tolua_hfile} 38 COMMAND tolua exe_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} 44 48 DEPENDS ${TOLUA_PARSER_DEPENDENCIES} 45 49 IMPLICIT_DEPENDS CXX ${_tolua_inputfiles} 46 WORKING_DIRECTORY ${ORXONOX_ LIBRARY_BIN_DIR}50 WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY} 47 51 COMMENT "Generating tolua bind files for package ${_tolua_package}" 48 52 ) 49 END MACRO(TOLUA)53 ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
Note: See TracChangeset
for help on using the changeset viewer.