Changeset 8729 for code/trunk/cmake/tools/GenerateToluaBindings.cmake
- Timestamp:
- Jul 4, 2011, 2:47:44 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/cmake/tools/GenerateToluaBindings.cmake
r8363 r8729 49 49 SET(_tolua_pkgfile "${CMAKE_CURRENT_BINARY_DIR}/tolua.pkg") 50 50 SET(_tolua_cxxfile "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.cc") 51 SET(_tolua_hfile "${CMAKE_BINARY_DIR}/src/toluabind/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.h")51 #SET(_tolua_hfile "${CMAKE_BINARY_DIR}/src/toluabind/${CMAKE_CFG_INTDIR}/ToluaBind${_tolua_package}.h") 52 52 53 53 SET(${_target_source_files} 54 54 ${${_target_source_files}} 55 55 ${_tolua_cxxfile} 56 ${_tolua_hfile}57 56 PARENT_SCOPE 58 57 ) 59 58 60 # Disable annoying GCC warnings61 59 IF(CMAKE_COMPILER_IS_GNU) 60 # Disable annoying GCC warnings 62 61 SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w") 62 ENDIF() 63 64 IF(MSVC) 65 # Including the file in a build unit is impossible because CMAKE_CFG_INTDIR 66 # exands to an expression that the compiler doesn't understand 67 SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES EXCLUDE_FROM_BUILD_UNITS TRUE) 63 68 ENDIF() 64 69 … … 70 75 ENDFOREACH(_tolua_inputfile) 71 76 77 IF(TOLUA_PARSER_HOOK_SCRIPT) 78 # Hook scripts may contain functions that act as Tolua hooks 79 SET(_hook_script -L "${TOLUA_PARSER_HOOK_SCRIPT}") 80 ENDIF() 81 72 82 ADD_CUSTOM_COMMAND( 73 OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}83 OUTPUT ${_tolua_cxxfile} 74 84 COMMAND toluaapp_orxonox -n ${_tolua_package} 75 85 -w ${CMAKE_CURRENT_SOURCE_DIR} 76 86 -o ${_tolua_cxxfile} 77 -H ${_tolua_hfile}78 87 -s ${TOLUA_PARSER_SOURCE} 88 ${_hook_script} 79 89 ${_tolua_pkgfile} 80 90 DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
Note: See TracChangeset
for help on using the changeset viewer.