Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 8, 2013, 5:34:34 PM (11 years ago)
Author:
landauf
Message:

adjusted build-system and include-paths for cegui 0.8 (doesn't compile yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/libs/cmake/tools/FindCEGUI.cmake

    r9163 r9670  
    3131INCLUDE(HandleLibraryTypes)
    3232
    33 # Find CEGUI headers
    34 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     33# Determine CEGUI's version
     34FIND_FILE(CEGUI_VERSION_FILE CEGUIVersion.h Version.h
    3535  PATHS $ENV{CEGUIDIR}
    3636  PATH_SUFFIXES include include/CEGUI
    3737)
     38DETERMINE_VERSION(CEGUI ${CEGUI_VERSION_FILE})
    3839
    39 # Inspect CEGUIVersion.h for the version number
    40 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     40# Find CEGUI headers
     41COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.8" _version_0_8_compare TRUE)
     42# Version 0.8 introduced a new directory and file naming convention
     43IF(_version_0_8_compare GREATER -1)
     44  # 0.8 and newer
     45  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI/CEGUI.h
     46    PATHS $ENV{CEGUIDIR}
     47    PATH_SUFFIXES include
     48  )
     49ELSE()
     50  # 0.8 and older
     51  FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     52    PATHS $ENV{CEGUIDIR}
     53    PATH_SUFFIXES include include/CEGUI
     54  )
     55ENDIF()
    4156
    4257# Find CEGUI library
    4358FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
    44   NAMES CEGUIBase CEGUI
     59  NAMES CEGUIBase CEGUI CEGUIBase-0
    4560  PATHS $ENV{CEGUIDIR}
    4661  PATH_SUFFIXES lib bin
     
    5570
    5671# Find CEGUILua headers
    57 FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
     72FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h Functor.h
    5873  PATHS
    5974    $ENV{CEGUIDIR}
    6075    $ENV{CEGUILUADIR}
    6176    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     77    ${CEGUI_INCLUDE_DIR}/CEGUI/ScriptModules/Lua
    6278  PATH_SUFFIXES include include/CEGUI
    6379)
    6480# Find CEGUILua libraries
    6581FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    66   NAMES CEGUILua CEGUILuaScriptModule
     82  NAMES CEGUILua CEGUILuaScriptModule CEGUILuaScriptModule-0
    6783  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
    6884  PATH_SUFFIXES lib bin
     
    8298    # For newer CEGUI versions >= 0.7
    8399    ${CEGUILUA_INCLUDE_DIR}/support/tolua++
     100    ${DEP_INCLUDE_DIR}/tolua++/include
    84101    # For Mac OS X, tolua++ is a separate framework in the dependency package
    85102    ${DEP_FRAMEWORK_DIR}
     
    99116
    100117# Newer versions of CEGUI have the renderer for OGRE shipped with them
    101 COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
    102 IF(_version_compare GREATER -1)
     118COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_0_7_compare TRUE)
     119IF(_version_0_7_compare GREATER -1)
    103120  # Find CEGUI OGRE Renderer headers
    104   FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
     121  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h Renderer.h
    105122    PATHS
    106123      $ENV{CEGUIDIR}
     
    111128  # Find CEGUI OGRE Renderer libraries
    112129  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
    113     NAMES CEGUIOgreRenderer
     130    NAMES CEGUIOgreRenderer CEGUIOgreRenderer-0
    114131    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    115132    PATH_SUFFIXES lib bin
Note: See TracChangeset for help on using the changeset viewer.