[1505] | 1 | # Find OGRE includes and library |
---|
| 2 | # |
---|
| 3 | # This module defines |
---|
| 4 | # OGRE_INCLUDE_DIR |
---|
[2509] | 5 | # OGRE_LIBRARY, the library to link against to use OGRE. |
---|
[1505] | 6 | # OGRE_FOUND, If false, do not try to use OGRE |
---|
| 7 | # |
---|
| 8 | # Copyright © 2007, Matt Williams |
---|
| 9 | # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture of the ETH Zurich |
---|
| 10 | # |
---|
| 11 | # Redistribution and use is allowed according to the terms of the BSD license. |
---|
[1776] | 12 | # |
---|
| 13 | # Several changes and additions by Fabian 'x3n' Landau |
---|
[2509] | 14 | # Lots of simplifications by Adrian Friedli |
---|
[1776] | 15 | # > www.orxonox.net < |
---|
[1505] | 16 | |
---|
[2616] | 17 | INCLUDE(DetermineVersion) |
---|
| 18 | INCLUDE(FindPackageHandleAdvancedArgs) |
---|
[2583] | 19 | INCLUDE(HandleLibraryTypes) |
---|
| 20 | |
---|
[2509] | 21 | FIND_PATH(OGRE_INCLUDE_DIR Ogre.h |
---|
[2616] | 22 | PATHS $ENV{OGRE_HOME} |
---|
| 23 | PATH_SUFFIXES include include/OGRE |
---|
[2509] | 24 | ) |
---|
[2579] | 25 | FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED |
---|
[2616] | 26 | NAMES OgreMain |
---|
| 27 | PATHS $ENV{OGRE_HOME} |
---|
| 28 | PATH_SUFFIXES lib bin/Release bin/release Release release |
---|
[2579] | 29 | ) |
---|
| 30 | FIND_LIBRARY(OGRE_LIBRARY_DEBUG |
---|
[2616] | 31 | NAMES OgreMaind OgreMain_d |
---|
| 32 | PATHS $ENV{OGRE_HOME} |
---|
| 33 | PATH_SUFFIXES lib bin/Debug bin/debug Debug debug |
---|
[2579] | 34 | ) |
---|
[1505] | 35 | |
---|
[2616] | 36 | # Inspect OgrePrerquisites.h for the version number |
---|
| 37 | DETERMINE_VERSION(OGRE ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h) |
---|
| 38 | |
---|
| 39 | # Handle the REQUIRED argument and set OGRE_FOUND |
---|
| 40 | # Also check the version requirements |
---|
| 41 | FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION} |
---|
| 42 | OGRE_INCLUDE_DIR |
---|
| 43 | OGRE_LIBRARY_OPTIMIZED |
---|
[2509] | 44 | ) |
---|
[1776] | 45 | |
---|
[2616] | 46 | # Collect optimized and debug libraries |
---|
[2614] | 47 | HANDLE_LIBRARY_TYPES(OGRE) |
---|
[2579] | 48 | |
---|
[2509] | 49 | MARK_AS_ADVANCED( |
---|
[2616] | 50 | OGRE_INCLUDE_DIR |
---|
| 51 | OGRE_LIBRARY_OPTIMIZED |
---|
| 52 | OGRE_LIBRARY_DEBUG |
---|
[2509] | 53 | ) |
---|