[1505] | 1 | # Find CEGUI includes and library |
---|
| 2 | # |
---|
| 3 | # This module defines |
---|
| 4 | # CEGUI_INCLUDE_DIR |
---|
| 5 | # CEGUI_LIBRARIES, the libraries to link against to use CEGUI. |
---|
| 6 | # CEGUI_LIB_DIR, the location of the libraries |
---|
| 7 | # CEGUI_FOUND, If false, do not try to use CEGUI |
---|
| 8 | # |
---|
| 9 | # Created by Matt Williams to find OGRE libraries |
---|
| 10 | # Copyright © 2007, Matt Williams |
---|
| 11 | # |
---|
| 12 | # Modified by Nicolas Schlumberger to find CEGUI libraries |
---|
| 13 | # and make it run on the Tardis-Infrastucture of the ETH Zurich |
---|
| 14 | # Copyright 2007, Nicolas Schlumberger |
---|
| 15 | # |
---|
| 16 | # Redistribution and use is allowed according to the terms of the BSD license. |
---|
| 17 | |
---|
| 18 | IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR) |
---|
| 19 | SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent |
---|
| 20 | ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR) |
---|
| 21 | |
---|
| 22 | IF (WIN32) #Windows |
---|
| 23 | MESSAGE(STATUS "Looking for CEGUI") |
---|
| 24 | SET(CEGUI_INCLUDE_DIR ../libs/ogre/Dependencies/include/CEGUI) |
---|
| 25 | SET(CEGUI_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release/lib) |
---|
| 26 | SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase) |
---|
| 27 | ELSE (WIN32) #Unix |
---|
| 28 | FIND_PACKAGE(PkgConfig) |
---|
| 29 | PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack |
---|
| 30 | SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS}) |
---|
| 31 | SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR}) |
---|
| 32 | SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") |
---|
| 33 | ENDIF (WIN32) |
---|
| 34 | |
---|
| 35 | #Do some preparation |
---|
| 36 | SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR) |
---|
| 37 | SEPARATE_ARGUMENTS(CEGUI_LIBRARIES) |
---|
| 38 | |
---|
| 39 | SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "") |
---|
| 40 | SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") |
---|
[1645] | 41 | SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule" CACHE STRING "") |
---|
[1505] | 42 | SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "") |
---|
| 43 | |
---|
| 44 | IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES) |
---|
| 45 | SET(CEGUI_FOUND TRUE) |
---|
| 46 | ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES) |
---|
| 47 | |
---|
| 48 | IF (CEGUI_FOUND) |
---|
| 49 | IF (NOT CEGUI_FIND_QUIETLY) |
---|
| 50 | MESSAGE(STATUS " libraries : ${CEGUI_LIBRARIES} from ${CEGUI_LIB_DIR}") |
---|
| 51 | MESSAGE(STATUS " includes : ${CEGUI_INCLUDE_DIR}") |
---|
| 52 | ENDIF (NOT CEGUI_FIND_QUIETLY) |
---|
| 53 | ELSE (CEGUI_FOUND) |
---|
| 54 | IF (CEGUI_FIND_REQUIRED) |
---|
| 55 | MESSAGE(FATAL_ERROR "Could not find CEGUI") |
---|
| 56 | ENDIF (CEGUI_FIND_REQUIRED) |
---|
| 57 | ENDIF (CEGUI_FOUND) |
---|