Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7941 for code/branches/kicklib


Ignore:
Timestamp:
Feb 20, 2011, 10:49:06 PM (14 years ago)
Author:
rgrieder
Message:

Kicked CEGUILua from our repository and adjusted the build system accordingly.
The Linux part is still missing though.

Location:
code/branches/kicklib
Files:
1 added
8 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/cmake/LibraryConfig.cmake

    r7459 r7941  
    109109##### CEGUI #####
    110110# We make use of the CEGUI script module called CEGUILua.
    111 # However there is a small issue with that: We use Tolua, a C++ binding
    112 # generator ourselves. And we also have to use our bindings in the same
    113 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime
    114 # version are equal or else you get segmentation faults.
    115 # In order to match the Lua versions we decided to ship CEGUILua in our
    116 # repository, mainly because there is no way to determine which version of
    117 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly
    118 # because we can then choose the Lua version. Future plans might involve only
    119 # accepting Lua 5.1.
    120 
    121 # Insert all internally supported CEGUILua versions here
    122 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)
    123 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)
     111# However there is a small issue with that: Both CEGUILua and Orxonox use
     112# Lua library functions on the same objects. And it turns out that in this case
     113# the linked library must be EXACTLY the same.
     114# That means for us we have to find the Lua library that CEGUI was
     115# linked against if we don't use a dependency package.
     116
    124117FIND_PACKAGE(CEGUI 0.5 REQUIRED)
    125118
    126119##### Lua #####
    127 IF(CEGUILUA_USE_EXTERNAL_LIBRARY)
    128   COMPARE_VERSION_STRINGS(${CEGUI_VERSION} "0.6" _version_comparison)
    129   IF(version_comparison LESS 0)
    130     SET(LUA_VERSION_REQUEST 5.0)
    131   ELSE()
    132     SET(LUA_VERSION_REQUEST 5.1)
    133   ENDIF()
     120IF(NOT LUA_VERSION_REQUIREMENT)
     121  FIND_PACKAGE(Lua 5 REQUIRED)
    134122ELSE()
    135   SET(LUA_VERSION_REQUEST 5)
    136 ENDIF()
    137 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)
     123  FIND_PACKAGE(Lua ${LUA_VERSION_REQUIREMENT} EXACT REQUIRED)
     124ENDIF()
    138125
    139126##### OpenAL #####
  • code/branches/kicklib/cmake/tools/FindCEGUI.cmake

    r7163 r7941  
    44#  CEGUI_INCLUDE_DIR
    55#  CEGUI_LIBRARY, the library to link against to use CEGUI.
     6#  CEGUILUA_LIBRARY, the library to link against to use the CEGUI script module.
     7#  CEGUI_TOLUA_LIBRARY, the library to link against to use Tolua++.
    68#  CEGUI_FOUND, If false, do not try to use CEGUI
    79#  CEGUI_VERSION, the version as string "x.y.z"
    8 #  CEGUILUA_LIBRARY, Script module library
    9 #  CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here
    1010#
    1111# Input:
    1212#  ENV{CEGUIDIR}, CEGUI path, optional
    13 #  FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported
    14 #                                  in the source repository
    15 #  CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua
    1613#
    1714# Created by Matt Williams to find OGRE libraries
     
    3330INCLUDE(HandleLibraryTypes)
    3431
     32# Find CEGUI library
    3533FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3634  PATHS $ENV{CEGUIDIR}
     
    5048)
    5149
     50# Find CEGUILua libraries
     51FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
     52  NAMES CEGUILua CEGUILuaScriptModule
     53  PATHS $ENV{CEGUIDIR}
     54  PATH_SUFFIXES lib bin
     55)
     56FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
     57  NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
     58  PATHS $ENV{CEGUIDIR}
     59  PATH_SUFFIXES lib bin
     60)
     61
     62# Find CEGUI Tolua++ libraries
     63FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
     64  NAMES CEGUItoluapp tolua++
     65  PATHS $ENV{CEGUIDIR}
     66  PATH_SUFFIXES lib bin
     67)
     68FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
     69  NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
     70  PATHS $ENV{CEGUIDIR}
     71  PATH_SUFFIXES lib bin
     72)
     73
    5274# Inspect CEGUIVersion.h for the version number
    5375DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     
    5678# Also checks the version requirements if given
    5779FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}"
     80  CEGUI_INCLUDE_DIR
    5881  CEGUI_LIBRARY_OPTIMIZED
    59   CEGUI_INCLUDE_DIR
     82  CEGUILUA_LIBRARY_OPTIMIZED
     83  CEGUI_TOLUA_LIBRARY_OPTIMIZED
    6084)
    6185
    6286# Collect optimized and debug libraries
    6387HANDLE_LIBRARY_TYPES(CEGUI)
     88HANDLE_LIBRARY_TYPES(CEGUILUA)
     89HANDLE_LIBRARY_TYPES(CEGUI_TOLUA)
    6490
    6591MARK_AS_ADVANCED(
     
    6793  CEGUI_LIBRARY_OPTIMIZED
    6894  CEGUI_LIBRARY_DEBUG
     95  CEGUILUA_LIBRARY_OPTIMIZED
     96  CEGUILUA_LIBRARY_DEBUG
     97  CEGUI_TOLUA_LIBRARY_OPTIMIZED
     98  CEGUI_TOLUA_LIBRARY_DEBUG
    6999)
    70 
    71 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result)
    72 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    73   # Also try to find the CEGUILua libraries.
    74   # There would already be libraries in src/ for versions 0.5 and 0.6
    75   FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    76     NAMES CEGUILua
    77     PATHS $ENV{CEGUIDIR}
    78     PATH_SUFFIXES lib bin
    79   )
    80   FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
    81     NAMES CEGUILuad CEGUILua_d
    82     PATHS $ENV{CEGUIDIR}
    83     PATH_SUFFIXES lib bin
    84   )
    85 
    86   SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED})
    87   # Handle the REQUIRED argument and set CEGUILUA_FOUND
    88   FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG
    89     CEGUILUA_LIBRARY_OPTIMIZED
    90   )
    91 
    92   # Collect optimized and debug libraries
    93   HANDLE_LIBRARY_TYPES(CEGUILUA)
    94 
    95   MARK_AS_ADVANCED(
    96     CEGUILUA_LIBRARY_OPTIMIZED
    97     CEGUILUA_LIBRARY_DEBUG
    98   )
    99 
    100 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    101   SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE)
    102 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    103 
  • code/branches/kicklib/src/CMakeLists.txt

    r7819 r7941  
    4242ADD_COMPILER_FLAGS("-DZLIB_DLL"           WIN32 LINK_ZLIB_DYNAMIC)
    4343# If no defines are specified, these libs get linked dynamically
    44 ADD_COMPILER_FLAGS("-DCEGUI_STATIC"      WIN32 NOT LINK_CEGUI_DYNAMIC)
     44ADD_COMPILER_FLAGS("-DCEGUI_STATIC -DTOLUA_STATIC" WIN32 NOT LINK_CEGUI_DYNAMIC)
    4545ADD_COMPILER_FLAGS("-DOGRE_STATIC_LIB"    WIN32 NOT LINK_OGRE_DYNAMIC)
    4646ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       WIN32 NOT LINK_TCL_DYNAMIC)
     
    6060ENDIF()
    6161# If no defines are specified, these libs get linked dynamically
    62 ADD_COMPILER_FLAGS("-DCEGUILUA_STATIC"             WIN32 NOT _external_shared_link)
    6362ADD_COMPILER_FLAGS("-DENET_DLL"                    WIN32     _external_shared_link)
    6463ADD_COMPILER_FLAGS("-DOGRE_GUIRENDERER_STATIC_LIB" WIN32 NOT _external_shared_link)
    6564ADD_COMPILER_FLAGS("-DOIS_STATIC_LIB"              WIN32 NOT _external_shared_link)
    66 ADD_COMPILER_FLAGS("-DTOLUA_STATIC_BUILD"          WIN32 NOT _external_shared_link)
    6765
    6866############## Include Directories ##############
     
    9593  ${CMAKE_CURRENT_BINARY_DIR}
    9694)
    97 
    98 IF(CEGUILUA_USE_INTERNAL_LIBRARY)
    99   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/external/ceguilua/ceguilua-${CEGUI_VERSION})
    100 ENDIF()
    10195
    10296IF (DBGHELP_FOUND)
  • code/branches/kicklib/src/SpecialConfig.h.in

    r7818 r7941  
    4141
    4242#include "OrxonoxConfig.h"
    43 
    44 #cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY  ///< Set whether we must suffix "ceguilua/" for the CEGUILua.h include
    4543
    4644#cmakedefine DEPENDENCY_PACKAGE_ENABLE      ///< Defined if a precompiled depdency package was used. We then copy all libraries too when installing.
  • code/branches/kicklib/src/external/CMakeLists.txt

    r7459 r7941  
    2121
    2222ADD_SUBDIRECTORY(tolua)
    23 
    24 # Include CEGUILua if not requested otherwise
    25 IF(CEGUILUA_USE_INTERNAL_LIBRARY)
    26   IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
    27     MESSAGE(FATAL_ERROR "CEGUILua version not found in src folder. Update list of supported versions in LibraryConfig.cmake!")
    28   ENDIF()
    29 
    30   ADD_SUBDIRECTORY(ceguilua)
    31   SET(CEGUILUA_LIBRARY ${CEGUILUA_LIBRARY} PARENT_SCOPE)
    32 ENDIF()
    33 
    3423ADD_SUBDIRECTORY(bullet)
    3524ADD_SUBDIRECTORY(cpptcl)
  • code/branches/kicklib/src/external/tolua/CMakeLists.txt

    r7163 r7941  
    1717 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    1818 #
    19 
    20 ################### Tolua++ library ###################
    21 
    22 SET_SOURCE_FILES(TOLUA_FILES
    23   tolua_event.h
    24   tolua++.h
    25 COMPILATION_BEGIN ToluaCompilation.c
    26   tolua_event.c
    27   tolua_is.c
    28   tolua_map.c
    29   tolua_push.c
    30   tolua_to.c
    31 COMPILATION_END
    32 )
    33 
    34 ORXONOX_ADD_LIBRARY(tolua_orxonox
    35   ORXONOX_EXTERNAL
    36   DEFINE_SYMBOL
    37     "TOLUA_SHARED_BUILD"
    38   VERSION
    39     1.0.92
    40   LINK_LIBRARIES
    41     ${LUA_LIBRARIES}
    42   SOURCE_FILES
    43     ${TOLUA_FILES}
    44 )
    45 
    4619
    4720################## Tolua++ generator ##################
  • code/branches/kicklib/src/external/tolua/VERSION

    r5738 r7941  
    1 Tolua++ v1.0.92 with changes:
     1Tolua++ v1.0.92 (generator application only) with changes:
    22
    33- Exception handling by CEGUI team
  • code/branches/kicklib/src/external/tolua/changes_orxonox.diff

    r5738 r7941  
    1 diff -ruN tolua/tolua++.h tolua2/tolua++.h
    2 --- tolua/tolua++.h     Wed Jan 28 21:51:38 2009
    3 +++ tolua2/tolua++.h    Sat Jan 10 14:48:44 2009
    4 @@ -16,9 +16,34 @@
    5  #ifndef TOLUA_H
    6  #define TOLUA_H
    7  
    8 +/* original code */
    9 +/*
    10  #ifndef TOLUA_API
    11  #define TOLUA_API extern
    12  #endif
    13 +*/
    14 +
    15 +/********************************
    16 +******* ORXONOX CHANGES *********
    17 +********************************/
    18 +
    19 +#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined( TOLUA_STATIC_BUILD )
    20 +#  ifdef TOLUA_SHARED_BUILD
    21 +#    define TOLUA_API __declspec(dllexport)
    22 +#  else
    23 +#    if defined( __MINGW32__ )
    24 +#      define TOLUA_API
    25 +#    else
    26 +#      define TOLUA_API __declspec(dllimport)
    27 +#    endif
    28 +#  endif
    29 +#else
    30 +#  define TOLUA_API extern
    31 +#endif
    32 +
    33 +/********************************
    34 +****** END ORXONOX CHANGES ******
    35 +********************************/
    36  
    37  #define TOLUA_VERSION "tolua++-1.0.92"
    38  
    391diff -ruN tolua/tolua.c tolua2/tolua.c
    402--- tolua/tolua.c       Wed Jan 28 21:51:00 2009
  • code/branches/kicklib/src/external/tolua/lua/package.lua

    r5752 r7941  
    124124    output('#endif\n')
    125125    output('#include <string.h>\n\n')
    126     output('#include <tolua/tolua++.h>\n\n')
     126    output('#include <tolua++.h>\n\n')
    127127
    128128    if flags.H then
  • code/branches/kicklib/src/libraries/core/CMakeLists.txt

    r7284 r7941  
    9393    ${CEGUI_LIBRARY}
    9494    ${CEGUILUA_LIBRARY}
     95    ${CEGUI_TOLUA_LIBRARY}
    9596    ${LUA_LIBRARIES}
    9697    cpptcl_orxonox
     
    9899    ois_orxonox
    99100    tinyxml_orxonox
    100     tolua_orxonox
    101101    util
    102102  SOURCE_FILES
  • code/branches/kicklib/src/libraries/core/GUIManager.cc

    r7939 r7941  
    3030#include "GUIManager.h"
    3131
     32#include <memory>
    3233#include <boost/bind.hpp>
    33 #include <memory>
    3434
    3535#include <CEGUIDefaultLogger.h>
     
    4343#include <elements/CEGUIListbox.h>
    4444#include <elements/CEGUIListboxItem.h>
     45
     46#include <CEGUILua.h>
    4547#include <ogreceguirenderer/OgreCEGUIRenderer.h>
    46 
    47 #include "SpecialConfig.h" // Configures the macro below
    48 #ifdef CEGUILUA_USE_INTERNAL_LIBRARY
    49 #   include <ceguilua/CEGUILua.h>
    50 #else
    51 #   include <CEGUILua.h>
    52 #endif
    5348
    5449#include "util/Clock.h"
  • code/branches/kicklib/src/libraries/core/LuaState.cc

    r7284 r7941  
    3030#include "LuaState.h"
    3131
    32 #include <tolua/tolua++.h>
     32#include <tolua++.h>
    3333extern "C" {
    3434#include <lua.h>
  • code/branches/kicklib/src/orxonox/CMakeLists.txt

    r7648 r7941  
    7878    ${VORBIS_LIBRARY}
    7979    ${OGG_LIBRARY}
     80    ${CEGUI_TOLUA_LIBRARY}
    8081    tinyxml_orxonox
    81     tolua_orxonox
    8282    bullet_orxonox
    8383    util
Note: See TracChangeset for help on using the changeset viewer.