Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.