Changeset 2519
- Timestamp:
- Dec 21, 2008, 11:06:12 PM (16 years ago)
- Location:
- code/branches/buildsystem2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/UseTolua.cmake
r2510 r2519 16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 17 17 18 SET(_tolua_executable_name toluaexe_orxonox)19 GET_TARGET_PROPERTY(TOLUA_EXECUTABLE "${_tolua_executable_name}" LOCATION)20 18 IF(MINGW_LIBRARY_DIR) 21 19 SET(_tolua_command_wd "WORKING_DIRECTORY;${MINGW_LIBRARY_DIR}/lua-5.1.3/lib") … … 32 30 SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/ToluaBind${_tolua_package}.cc") 33 31 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}) 35 33 36 34 # TODO: check secureness of this temporary file 37 FILE(REMOVE "${_tolua_pkgfile}")35 FILE(REMOVE ${_tolua_pkgfile}) 38 36 FOREACH(_tolua_inputfile ${_tolua_inputfiles}) 39 FILE(APPEND "${_tolua_pkgfile}""\$cfile \"${_tolua_inputfile}\"\n")37 FILE(APPEND ${_tolua_pkgfile} "\$cfile \"${_tolua_inputfile}\"\n") 40 38 ENDFOREACH(_tolua_inputfile) 41 39 40 # Note: Some of the variables are already defined in src/tolua/CMakeLists.txt 42 41 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} 51 50 IMPLICIT_DEPENDS CXX ${_tolua_inputfiles} 52 51 ${_tolua_command_wd} -
code/branches/buildsystem2/src/CMakeLists.txt
r2510 r2519 53 53 ENDIF (WIN32) 54 54 55 # Include macro to easily add source files in subdirectories55 # Include macros 56 56 INCLUDE(AddSourceFiles) 57 INCLUDE(UseTolua) 57 58 58 59 # Our own libraries -
code/branches/buildsystem2/src/core/CMakeLists.txt
r2518 r2519 47 47 WRITE_SOURCE_FILES(CORE_SRC_FILES) 48 48 49 INCLUDE(UseTolua)50 49 TOLUA(Core CORE_SRC_FILES INPUTFILES LuaBind.h CommandExecutor.h) 51 50 -
code/branches/buildsystem2/src/orxonox/CMakeLists.txt
r2518 r2519 16 16 WRITE_SOURCE_FILES(ORXONOX_SRC_FILES) 17 17 18 INCLUDE(UseTolua)19 18 TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h) 20 19 -
code/branches/buildsystem2/src/tolua/CMakeLists.txt
r2510 r2519 6 6 tolua_to.c 7 7 ) 8 9 TARGET_LINK_LIBRARIES(tolualib_orxonox ${LUA_LIBRARIES})10 8 11 9 #INSTALL(TARGETS tolualib_orxonox LIBRARY DESTINATION lib) … … 27 25 ENDIF("${LUA_VERSION}" MATCHES "^5.0") 28 26 27 # Set some variables to the parent scope in order to use them in the TOLUA macro 28 GET_TARGET_PROPERTY(_temp_location toluaexe_orxonox LOCATION) 29 SET(TOLUA_PARSER_EXECUTABLE ${_temp_location} PARENT_SCOPE) 29 30 SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" PARENT_SCOPE) 30 31 SET(TOLUA_PARSER_DEPENDENCIES 32 toluaexe_orxonox 31 33 ${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK} 32 34 ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
Note: See TracChangeset
for help on using the changeset viewer.