[1505] | 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. |
---|
[1776] | 17 | # |
---|
| 18 | # Several changes and additions by Fabian 'x3n' Landau |
---|
| 19 | # > www.orxonox.net < |
---|
[1505] | 20 | |
---|
[1776] | 21 | IF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR) |
---|
[1505] | 22 | SET(CEGUI_OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent |
---|
[1776] | 23 | ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIB_DIR) |
---|
[1505] | 24 | |
---|
| 25 | IF (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) |
---|
| 30 | ELSE (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 "") |
---|
| 36 | ENDIF (WIN32) |
---|
| 37 | |
---|
| 38 | #Do some preparation |
---|
| 39 | SEPARATE_ARGUMENTS(CEGUI_OGRE_INCLUDE_DIR) |
---|
| 40 | SEPARATE_ARGUMENTS(CEGUI_OGRE_LIBRARIES) |
---|
| 41 | |
---|
| 42 | SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIR} CACHE PATH "") |
---|
| 43 | SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "") |
---|
| 44 | SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIB_DIR} CACHE PATH "") |
---|
| 45 | |
---|
[1776] | 46 | IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR) |
---|
[1505] | 47 | SET(CEGUI_OGRE_FOUND TRUE) |
---|
[1776] | 48 | ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_LIB_DIR) |
---|
[1505] | 49 | |
---|
| 50 | IF (CEGUI_OGRE_FOUND) |
---|
| 51 | IF (NOT CEGUI_OGRE_FIND_QUIETLY) |
---|
[1776] | 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) |
---|
[1505] | 58 | ENDIF (NOT CEGUI_OGRE_FIND_QUIETLY) |
---|
| 59 | ELSE (CEGUI_OGRE_FOUND) |
---|
[1776] | 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) |
---|
[1505] | 69 | ENDIF (CEGUI_OGRE_FOUND) |
---|