Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:32:28 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 7940-7974 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
1 deleted
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/cmake/LibraryConfig.cmake

    r8264 r8283  
    9393# Performs the search and sets the variables    #
    9494
    95 FIND_PACKAGE(OGRE  1.4       REQUIRED)
    96 #FIND_PACKAGE(ENet  1.1       REQUIRED)
     95FIND_PACKAGE(OGRE     1.6    REQUIRED)
     96#FIND_PACKAGE(ENet     1.1    REQUIRED)
     97FIND_PACKAGE(Lua5.1          REQUIRED)
    9798FIND_PACKAGE(Ogg             REQUIRED)
    9899FIND_PACKAGE(Vorbis          REQUIRED)
     
    111112##### CEGUI #####
    112113# We make use of the CEGUI script module called CEGUILua.
    113 # However there is a small issue with that: We use Tolua, a C++ binding
    114 # generator ourselves. And we also have to use our bindings in the same
    115 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime
    116 # version are equal or else you get segmentation faults.
    117 # In order to match the Lua versions we decided to ship CEGUILua in our
    118 # repository, mainly because there is no way to determine which version of
    119 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly
    120 # because we can then choose the Lua version. Future plans might involve only
    121 # accepting Lua 5.1.
    122 
    123 # Insert all internally supported CEGUILua versions here
    124 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)
    125 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)
    126 FIND_PACKAGE(CEGUI 0.5 REQUIRED)
    127 
    128 ##### Lua #####
    129 IF(CEGUILUA_USE_EXTERNAL_LIBRARY)
    130   COMPARE_VERSION_STRINGS(${CEGUI_VERSION} "0.6" _version_comparison)
    131   IF(version_comparison LESS 0)
    132     SET(LUA_VERSION_REQUEST 5.0)
    133   ELSE()
    134     SET(LUA_VERSION_REQUEST 5.1)
    135   ENDIF()
    136 ELSE()
    137   SET(LUA_VERSION_REQUEST 5)
    138 ENDIF()
    139 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)
     114# However there is a small issue with that: Both CEGUILua and Orxonox use
     115# Lua library functions on the same objects. And it turns out that in this case
     116# the linked library must be EXACTLY the same.
     117# Since Lua v5.1 has been out for a long while, this does not seem to be a
     118# problem anymore, at least as long as Lua 5.2 is not released.
     119FIND_PACKAGE(CEGUI 0.6 REQUIRED)
    140120
    141121##### OpenAL #####
     
    177157# Note: Default option in the libraries vary, but our default option is dynamic
    178158IF(WIN32)
    179   OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE)
    180   OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE)
    181   #OPTION(LINK_ENET_DYNAMIC  "Link ENet dynamically on Windows" TRUE)
    182   OPTION(LINK_OGRE_DYNAMIC  "Link OGRE dynamically on Windows" TRUE)
    183   OPTION(LINK_TCL_DYNAMIC   "Link TCL dynamically on Windows" TRUE)
    184   OPTION(LINK_ZLIB_DYNAMIC  "Link ZLib dynamically on Windows" TRUE)
    185   COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison)
    186   IF(_version_comparison LESS 0)
    187     OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" FALSE)
    188   ELSE(_version_comparison LESS 0)
    189     OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" TRUE)
    190   ENDIF(_version_comparison LESS 0)
     159  OPTION(LINK_BOOST_DYNAMIC  "Link Boost dynamically on Windows" TRUE)
     160  OPTION(LINK_CEGUI_DYNAMIC  "Link CEGUI dynamicylly on Windows" TRUE)
     161  #OPTION(LINK_ENET_DYNAMIC   "Link ENet dynamically on Windows" TRUE)
     162  OPTION(LINK_OGRE_DYNAMIC   "Link OGRE dynamically on Windows" TRUE)
     163  OPTION(LINK_TCL_DYNAMIC    "Link TCL dynamically on Windows" TRUE)
     164  OPTION(LINK_ZLIB_DYNAMIC   "Link ZLib dynamically on Windows" TRUE)
     165  OPTION(LINK_LUA5.1_DYNAMIC "Link Lua dynamically on Windows" TRUE)
    191166
    192167  IF(DEPENDENCY_PACKAGE_ENABLE)
     
    194169      LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC #LINK_ENET_DYNAMIC
    195170      LINK_OGRE_DYNAMIC  LINK_TCL_DYNAMIC   LINK_ZLIB_DYNAMIC
    196       LINK_LUA_DYNAMIC
     171      LINK_LUA5.1_DYNAMIC
    197172    )
    198173  ENDIF()
  • code/branches/kicklib2/cmake/LibraryConfigTardis.cmake

    r6746 r8283  
    7777  #SET(ENV{OGGDIR}      "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
    7878  #SET(ENV{VORBISDIR}   "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
    79   #SET(ENV{LUA_DIR}     "/usr/pack/lua-5.1.4-sd;/usr/pack/lua-5.1.4-sd/i686-debian-linux4.0")
     79  #SET(ENV{LUA5.1_DIR}  "/usr/pack/lua-5.1.4-sd;/usr/pack/lua-5.1.4-sd/i686-debian-linux4.0")
    8080  #SET(ENV{OGRE_HOME}   "/usr/pack/ogre-1.4.9-sd;/usr/pack/ogre-1.4.9-sd/i686-debian-linux4.0")
    8181  #SET(ENV{OPENALDIR}   "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
  • code/branches/kicklib2/cmake/PackageConfig.cmake

    r7459 r8283  
    3131#        But you can specify that the code only runs on 3.1 and higher
    3232#        or 4.0 and higher (so both 3.1 and 4.0 will work).
    33 SET(ALLOWED_MINIMUM_VERSIONS 3.1 4.0 5.0)
     33IF(MSVC)
     34  SET(ALLOWED_MINIMUM_VERSIONS 4.3 5.1 6.0)
     35ELSE()
     36  SET(ALLOWED_MINIMUM_VERSIONS 4.1 5.2)
     37ENDIF()
    3438
    3539IF(NOT EXISTS ${DEPENDENCY_PACKAGE_DIR}/version.txt)
     
    8488SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
    8589#SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
    86 SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
     90SET(ENV{LUA5.1_DIR}            ${DEP_INCLUDE_DIR}/lua)
    8791SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg)
    8892SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis)
  • code/branches/kicklib2/cmake/tools/FindCEGUI.cmake

    r7163 r8283  
    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
     
    2926#                 > www.orxonox.net <
    3027
     28INCLUDE(CompareVersionStrings)
    3129INCLUDE(DetermineVersion)
    3230INCLUDE(FindPackageHandleAdvancedArgs)
    3331INCLUDE(HandleLibraryTypes)
    3432
     33# Find headers
    3534FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3635  PATHS $ENV{CEGUIDIR}
    3736  PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
    3837)
     38
     39# Inspect CEGUIVersion.h for the version number
     40DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     41
     42# Find CEGUI library
    3943FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
    4044  NAMES CEGUIBase CEGUI
     
    5054)
    5155
    52 # Inspect CEGUIVersion.h for the version number
    53 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     56# Find CEGUILua libraries
     57FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
     58  NAMES CEGUILua CEGUILuaScriptModule
     59  PATHS $ENV{CEGUIDIR}
     60  PATH_SUFFIXES lib bin
     61)
     62FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
     63  NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
     64  PATHS $ENV{CEGUIDIR}
     65  PATH_SUFFIXES lib bin
     66)
     67
     68# Find CEGUI Tolua++ libraries
     69FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
     70  NAMES CEGUItoluapp tolua++
     71  PATHS $ENV{CEGUIDIR}
     72  PATH_SUFFIXES lib bin
     73)
     74FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
     75  NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
     76  PATHS $ENV{CEGUIDIR}
     77  PATH_SUFFIXES lib bin
     78)
     79
     80# Newer versions of CEGUI have the renderer for OGRE shipped with them
     81COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
     82IF(_version_compare GREATER -1)
     83  # Find CEGUI OGRE Renderer libraries
     84  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     85    NAMES CEGUIOgreRenderer
     86    PATHS $ENV{CEGUIDIR}
     87    PATH_SUFFIXES lib bin
     88  )
     89  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
     90    NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d
     91    PATHS $ENV{CEGUIDIR}
     92    PATH_SUFFIXES lib bin
     93  )
     94  SET(CEGUI_OGRE_RENDERER_LIBRARY_NAME CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED)
     95ELSE()
     96  SET(CEGUI_OGRE_RENDERER_BUILD_REQUIRED TRUE)
     97ENDIF()
    5498
    5599# Handle the REQUIRED argument and set CEGUI_FOUND
    56100# Also checks the version requirements if given
    57101FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}"
     102  CEGUI_INCLUDE_DIR
    58103  CEGUI_LIBRARY_OPTIMIZED
    59   CEGUI_INCLUDE_DIR
     104  CEGUILUA_LIBRARY_OPTIMIZED
     105  CEGUI_TOLUA_LIBRARY_OPTIMIZED
     106  ${CEGUI_OGRE_RENDERER_LIBRARY_NAME}
    60107)
    61108
    62109# Collect optimized and debug libraries
    63110HANDLE_LIBRARY_TYPES(CEGUI)
     111HANDLE_LIBRARY_TYPES(CEGUILUA)
     112HANDLE_LIBRARY_TYPES(CEGUI_TOLUA)
     113IF(NOT CEGUI_OGRE_RENDERER_BUILD_REQUIRED)
     114  HANDLE_LIBRARY_TYPES(CEGUI_OGRE_RENDERER)
     115ENDIF()
    64116
    65117MARK_AS_ADVANCED(
     
    67119  CEGUI_LIBRARY_OPTIMIZED
    68120  CEGUI_LIBRARY_DEBUG
     121  CEGUILUA_LIBRARY_OPTIMIZED
     122  CEGUILUA_LIBRARY_DEBUG
     123  CEGUI_TOLUA_LIBRARY_OPTIMIZED
     124  CEGUI_TOLUA_LIBRARY_DEBUG
     125  CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     126  CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
    69127)
    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 
Note: See TracChangeset for help on using the changeset viewer.