Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/mac_osx2/cmake/tools/GenerateToluaBindings.cmake @ 8566

Last change on this file since 8566 was 8351, checked in by rgrieder, 14 years ago

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1 #
2 #             ORXONOX - the hottest 3D action shooter ever to exist
3 #                             > www.orxonox.net <
4 #
5 #        This program is free software; you can redistribute it and/or
6 #         modify it under the terms of the GNU General Public License
7 #        as published by the Free Software Foundation; either version 2
8 #            of the License, or (at your option) any later version.
9 #
10 #       This program is distributed in the hope that it will be useful,
11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #                 GNU General Public License for more details.
14 #
15 #   You should have received a copy of the GNU General Public License along
16 #      with this program; if not, write to the Free Software Foundation,
17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 #
19 #
20 #  Author:
21 #    Adrian Friedli
22 #  Description:
23 #    Sets the CMake options that will generate Tolua++ bindings.
24 #  Parameters:
25 #    _tolua_package - Name of the package, e.g. "Core"
26 #    _target_source_files - Variable name of the target source files, the
27 #                           script will add the generated files to this list.
28 #    ARGN - The header files in the style "INTPUTFILES Foo.h Bar.h"
29 #  Global Variables: (need to be set before)
30 #    TOLUA_PARSER_SOURCE - Lua file with the parser source code
31 #    TOLUA_PARSER_DEPENDENCIES - All the dependent lua files
32 #    RUNTIME_LIBRARY_DIRECTORY - Working directory
33 #
34
35# Workaround for XCode: The folder where the bind files are written to has
36# to be present beforehand.
37# We have to do this here because the header files are all stored in a single
38# location per configuration.
39IF(CMAKE_CONFIGURATION_TYPES)
40  FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES})
41    FILE(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/src/toluabind/${_dir}")
42  ENDFOREACH(_dir)
43ENDIF()
44
45FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files)
46  SET(_tolua_inputfiles ${ARGN})
47  LIST(REMOVE_ITEM _tolua_inputfiles "INPUTFILES")
48
49  SET(_tolua_pkgfile "${CMAKE_CURRENT_BINARY_DIR}/tolua.pkg")
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")
52
53  SET(${_target_source_files}
54    ${${_target_source_files}}
55    ${_tolua_cxxfile}
56    ${_tolua_hfile}
57    PARENT_SCOPE
58  )
59
60  # Disable annoying GCC warnings
61  IF(CMAKE_COMPILER_IS_GNU)
62    SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w")
63  ENDIF()
64
65  # Tolua binding speedup if required
66  IF(ORXONOX_RELEASE)
67    SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-DTOLUA_RELEASE")
68  ENDIF()
69
70  # Create temporary package file and implicit dependencies
71  FILE(REMOVE ${_tolua_pkgfile})
72  FOREACH(_tolua_inputfile ${_tolua_inputfiles})
73    FILE(APPEND ${_tolua_pkgfile} "\$cfile \"${_tolua_inputfile}\"\n")
74    LIST(APPEND _implicit_dependencies CXX ${_tolua_inputfile})
75  ENDFOREACH(_tolua_inputfile)
76
77  ADD_CUSTOM_COMMAND(
78    OUTPUT ${_tolua_cxxfile} ${_tolua_hfile}
79    COMMAND toluaapp_orxonox -n ${_tolua_package}
80                             -w ${CMAKE_CURRENT_SOURCE_DIR}
81                             -o ${_tolua_cxxfile}
82                             -H ${_tolua_hfile}
83                             -s ${TOLUA_PARSER_SOURCE}
84                                ${_tolua_pkgfile}
85    DEPENDS           ${TOLUA_PARSER_DEPENDENCIES}
86    IMPLICIT_DEPENDS  ${_implicit_dependencies}
87    WORKING_DIRECTORY ${RUNTIME_LIBRARY_DIRECTORY}
88    COMMENT "Generating tolua bind files for package ${_tolua_package}"
89  )
90ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
Note: See TracBrowser for help on using the repository browser.