Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2008, 4:08:35 PM (16 years ago)
Author:
adrfried
Message:

FindCEGUI.cmake and others cleaned up

Location:
code/branches/buildsystem/cmake
Files:
1 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/cmake/CheckTardis.cmake

    r2061 r2197  
    4545  SET(ENV{OGGVORBISDIR} "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
    4646  #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
     47  SET(ENV{CEGUIDIR} "/usr/pack/cegui-0.5.0-sd;/usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1")
    4748ENDIF (IS_TARDIS)
     49
     50MARK_AS_ADVANCED(UNAME_CMD IS_TARDIS)
  • code/branches/buildsystem/cmake/FindCEGUI.cmake

    r1872 r2197  
    33# This module defines
    44#  CEGUI_INCLUDE_DIR
    5 #  CEGUI_LIBRARIES, the libraries to link against to use CEGUI.
    6 #  CEGUI_LIB_DIR, the location of the libraries
     5#  CEGUI_LIBRARY, the library to link against to use CEGUI.
    76#  CEGUI_FOUND, If false, do not try to use CEGUI
    87#
     
    1716#
    1817# Several changes and additions by Fabian 'x3n' Landau
     18# Lots of simplifications by Adrian Friedli
    1919#                 > www.orxonox.net <
    2020
    21 IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)
    22     SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent
    23 ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)
     21# TODO: Determine CEGUI version
    2422
    25 IF (WIN32) #Windows
    26     FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    27         ../libs/cegui-0.6.1/include
    28         ${DEPENDENCY_DIR}/cegui-0.6.1/include
    29     )
     23FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
     24    PATHS
     25    $ENV{CEGUIDIR}
     26    /usr/local
     27    /usr
     28    PATH_SUFFIXES include include/CEGUI
     29)
    3030
    31     SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase)
    32     FIND_LIBRARY(CEGUI_LIBDIR NAMES ${CEGUI_LIBRARIES} PATHS
    33         ../libs/cegui-0.6.1/bin
    34         ${DEPENDENCY_DIR}/cegui-0.6.1/lib
    35     )
    36 
    37     # Strip the filename from the path
    38     IF (CEGUI_LIBDIR)
    39         GET_FILENAME_COMPONENT(CEGUI_LIBDIR ${CEGUI_LIBDIR} PATH)
    40         SET (CEGUI_LIB_DIR ${CEGUI_LIBDIR} CACHE FILEPATH "")
    41     ENDIF (CEGUI_LIBDIR)
     31#SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase)
     32FIND_LIBRARY(CEGUI_LIBRARY
     33    NAMES CEGUIBase
     34    PATHS
     35    $ENV{CEGUIDIR}
     36    /usr/local
     37    /usr
     38    PATH_SUFFIXES lib
     39)
    4240
    4341#    IF (NOT CEGUI_SCRIPT_LIBDIR)
     
    5856#    ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
    5957
    60 #    # Strip the filename from the path
    61 #    IF (CEGUI_SCRIPT_LIBDIR)
    62 #        GET_FILENAME_COMPONENT(CEGUI_SCRIPT_LIBDIR ${CEGUI_SCRIPT_LIBDIR} PATH)
    63 #        SET (CEGUI_SCRIPT_LIB_DIR ${CEGUI_SCRIPT_LIBDIR} CACHE FILEPATH "")
    64 #    ENDIF (CEGUI_SCRIPT_LIBDIR)
     58INCLUDE(FindPackageHandleStandardArgs)
     59FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG
     60    CEGUI_LIBRARY
     61    CEGUI_INCLUDE_DIR
     62    #CEGUI_SCRIPT_LIBRARIES
     63)
    6564
    66 ELSE (WIN32) #Unix
    67     FIND_PACKAGE(PkgConfig)
    68     PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack
    69     SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})
    70     SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR})
    71     SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
    72 #    SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule")
    73 #    SET(CEGUI_SCRIPT_LIB_DIR)
    74 ENDIF (WIN32)
    75 
    76 IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)
    77     SET(CEGUI_FOUND TRUE)
    78 
    79     #Do some preparation
    80     SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR)
    81     SEPARATE_ARGUMENTS(CEGUI_LIBRARIES)
    82 
    83     SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "")
    84     SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
    85     SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "")
    86 #    SET(CEGUI_SCRIPT_LIBRARIES ${CEGUI_SCRIPT_LIBRARIES} CACHE PATH "")
    87 ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES)
    88 
    89 IF (CEGUI_FOUND)
    90     IF (NOT CEGUI_FIND_QUIETLY)
    91         MESSAGE(STATUS "CEGUI was found.")
    92         IF (VERBOSE_FIND)
    93             MESSAGE (STATUS "  include path: ${CEGUI_INCLUDE_DIR}")
    94             MESSAGE (STATUS "  library path: ${CEGUI_LIB_DIR}")
    95             MESSAGE (STATUS "  libraries:    ${CEGUI_LIBRARIES}")
    96 #            MESSAGE (STATUS "           :    ${CEGUI_SCRIPT_LIBRARIES}")
    97         ENDIF (VERBOSE_FIND)
    98     ENDIF (NOT CEGUI_FIND_QUIETLY)
    99 ELSE (CEGUI_FOUND)
    100     IF (NOT CEGUI_INCLUDE_DIR)
    101         MESSAGE(SEND_ERROR "CEGUI include path was not found.")
    102     ENDIF (NOT CEGUI_INCLUDE_DIR)
    103     IF (NOT CEGUI_LIB_DIR)
    104         MESSAGE(SEND_ERROR "CEGUI library was not found.")
    105     ENDIF (NOT CEGUI_LIB_DIR)
    106     IF (NOT CEGUI_LIBRARIES)
    107         MESSAGE(SEND_ERROR "CEGUI libraries not known.")
    108     ENDIF (NOT CEGUI_LIBRARIES)
    109 #    IF (NOT CEGUI_SCRIPT_LIBRARIES)
    110 #        MESSAGE(SEND_ERROR "CEGUI Lua script module was not found.")
    111 #    ENDIF (NOT CEGUI_SCRIPT_LIBRARIES)
    112 ENDIF (CEGUI_FOUND)
    113 
     65MARK_AS_ADVANCED(
     66    CEGUI_LIBRARY
     67    CEGUI_INCLUDE_DIR
     68    #CEGUI_SCRIPT_LIBRARIES
     69)
Note: See TracChangeset for help on using the changeset viewer.