Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/trunk/cmake/FindCEGUI_OGRE.cmake @ 5218

Last change on this file since 5218 was 5180, checked in by dafrick, 16 years ago
File size: 2.9 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#
18# Several changes and additions by Fabian 'x3n' Landau
19#                 > www.orxonox.net <
20
21IF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR)
22    SET(CEGUI_OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
23ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR)
24
25IF (WIN32) #Windows
26    MESSAGE(STATUS "Looking for CEGUI_OGRE")
27    SET(CEGUI_OGRE_INCLUDE_DIR ../libs/ogre/Samples/Common/CEGUIRenderer/include)
28    SET(CEGUI_OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release/lib)
29    SET(CEGUI_OGRE_LIBRARIES debug OgreGUIRenderer_d optimized OgreGUIRenderer)
30ELSE (WIN32) #Unix
31    FIND_PACKAGE(PkgConfig)
32    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
33    SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIRS})
34    SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIBDIR})
35    SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
36ENDIF (WIN32)
37
38#Do some preparation
39SEPARATE_ARGUMENTS(CEGUI_OGRE_INCLUDE_DIR)
40SEPARATE_ARGUMENTS(CEGUI_OGRE_LIBRARIES)
41
42SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIR} CACHE PATH "")
43SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
44SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIB_DIR} CACHE PATH "")
45
46IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR)
47    SET(CEGUI_OGRE_FOUND TRUE)
48ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR)
49
50IF (CEGUI_OGRE_FOUND)
51    IF (NOT CEGUI_OGRE_FIND_QUIETLY)
52        MESSAGE(STATUS "CEGUI_Ogre was found.")
53        IF (VERBOSE_FIND)
54            MESSAGE (STATUS "  include path: ${CEGUI_OGRE_INCLUDE_DIR}")
55            MESSAGE (STATUS "  library path: ${CEGUI_OGRE_LIB_DIR}")
56            MESSAGE (STATUS "  libraries:    ${CEGUI_OGRE_LIBRARIES}")
57        ENDIF (VERBOSE_FIND)
58    ENDIF (NOT CEGUI_OGRE_FIND_QUIETLY)
59ELSE (CEGUI_OGRE_FOUND)
60    IF (NOT CEGUI_OGRE_INCLUDE_DIR)
61        MESSAGE(SEND_ERROR "CEGUI_Ogre include path was not found.")
62    ENDIF (NOT CEGUI_OGRE_INCLUDE_DIR)
63    IF (NOT CEGUI_OGRE_LIB_DIR)
64        MESSAGE(SEND_ERROR "CEGUI_Ogre library was not found.")
65    ENDIF (NOT CEGUI_OGRE_LIB_DIR)
66    IF (NOT CEGUI_OGRE_LIBRARIES)
67        MESSAGE(SEND_ERROR "CEGUI_Ogre libraries not known.")
68    ENDIF (NOT CEGUI_OGRE_LIBRARIES)
69ENDIF (CEGUI_OGRE_FOUND)
Note: See TracBrowser for help on using the repository browser.