Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/cmake/FindCEGUI_OGRE.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.4 KB
Line 
1# Find CEGUI_OGRE includes and library
2#
3# This module defines
4#  CEGUI_OGRE_INCLUDE_DIR
5#  CEGUI_OGRE_LIBRARIES, the libraries to link against to use CEGUI_OGRE.
6#  CEGUI_OGRE_LIB_DIR, the location of the libraries
7#  CEGUI_OGRE_FOUND, If false, do not try to use CEGUI_OGRE
8#
9# Created by Matt Williams to find OGRE libraries
10# Copyright © 2007, Matt Williams
11#
12# Modified by Nicolas Schlumberger to find CEGUI-OGRE 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_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
19    SET(CEGUI_OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
20ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
21
22## TODO: test windows part
23# windows part is currently untested. (28.Oct.2007)
24IF (WIN32) #Windows
25    MESSAGE(STATUS "Looking for CEGUI_OGRE")
26    SET(CEGUI_OGRESDK $ENV{CEGUI_OGRE_HOME})
27    STRING(REGEX REPLACE "[\\]" "/" CEGUI_OGRESDK "${CEGUI_OGRESDK}" )
28    SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRESDK}/include)
29    SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRESDK}/lib)
30    SET(CEGUI_OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
31ELSE (WIN32) #Unix
32    FIND_PACKAGE(PkgConfig)
33    PKG_SEARCH_MODULE(CEGUI_OGRE CEGUI-OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI_OGRE.pc) # tardis specific hack
34    SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIRS})
35    SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIBDIR})
36    SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
37ENDIF (WIN32)
38
39#Do some preparation
40SEPARATE_ARGUMENTS(CEGUI_OGRE_INCLUDE_DIR)
41SEPARATE_ARGUMENTS(CEGUI_OGRE_LIBRARIES)
42
43SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIR} CACHE PATH "")
44SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
45SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIB_DIR} CACHE PATH "")
46
47IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
48    SET(CEGUI_OGRE_FOUND TRUE)
49ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
50
51IF (CEGUI_OGRE_FOUND)
52    IF (NOT CEGUI_OGRE_FIND_QUIETLY)
53        MESSAGE(STATUS "  libraries : ${CEGUI_OGRE_LIBRARIES} from ${CEGUI_OGRE_LIB_DIR}")
54        MESSAGE(STATUS "  includes  : ${CEGUI_OGRE_INCLUDE_DIR}")
55    ENDIF (NOT CEGUI_OGRE_FIND_QUIETLY)
56ELSE (CEGUI_OGRE_FOUND)
57    IF (CEGUI_OGRE_FIND_REQUIRED)
58        MESSAGE(FATAL_ERROR "Could not find CEGUI_OGRE")
59    ENDIF (CEGUI_OGRE_FIND_REQUIRED)
60ENDIF (CEGUI_OGRE_FOUND)
Note: See TracBrowser for help on using the repository browser.