Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/cmake/FindCEGUI.cmake @ 114

Last change on this file since 114 was 114, checked in by anonymous, 17 years ago

nicolasc: minor changes in .camke

File size: 2.1 KB
Line 
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
18IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
19    SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent
20ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
21
22# TODO: test wondows part.
23# windows part currently untested. (28.>Oct2007)
24IF (WIN32) #Windows
25    MESSAGE(STATUS "Looking for CEGUI")
26    SET(CEGUISDK $ENV{CEGUI_HOME})
27    STRING(REGEX REPLACE "[\\]" "/" CEGUISDK "${CEGUISDK}" )
28    SET(CEGUI_INCLUDE_DIR ${CEGUISDK}/include)
29    SET(CEGUI_LIB_DIR ${CEGUISDK}/lib)
30    SET(CEGUI_LIBRARIES debug OgreMain_d optimized OgreMain)
31ELSE (WIN32) #Unix
32    FIND_PACKAGE(PkgConfig)
33    PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack
34    SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})
35    SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR})
36    SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
37ENDIF (WIN32)
38
39#Do some preparation
40SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR)
41SEPARATE_ARGUMENTS(CEGUI_LIBRARIES)
42
43SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "")
44SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
45SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "")
46
47IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
48    SET(CEGUI_FOUND TRUE)
49ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
50
51IF (CEGUI_FOUND)
52    IF (NOT CEGUI_FIND_QUIETLY)
53        MESSAGE(STATUS "  libraries : ${CEGUI_LIBRARIES} from ${CEGUI_LIB_DIR}")
54        MESSAGE(STATUS "  includes  : ${CEGUI_INCLUDE_DIR}")
55    ENDIF (NOT CEGUI_FIND_QUIETLY)
56ELSE (CEGUI_FOUND)
57    IF (CEGUI_FIND_REQUIRED)
58        MESSAGE(FATAL_ERROR "Could not find CEGUI")
59    ENDIF (CEGUI_FIND_REQUIRED)
60ENDIF (CEGUI_FOUND)
Note: See TracBrowser for help on using the repository browser.