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