Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindOGRE.cmake @ 2670

Last change on this file since 2670 was 2648, checked in by rgrieder, 16 years ago
  • More debug library names
  • Fixed typo in FindOgg
  • Property svn:eol-style set to native
File size: 1.6 KB
RevLine 
[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
[2626]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
[2509]15# Lots of simplifications by Adrian Friedli
[2626]16# Version checking by Reto Grieder
[1776]17#                 > www.orxonox.net <
[1505]18
[2616]19INCLUDE(DetermineVersion)
20INCLUDE(FindPackageHandleAdvancedArgs)
[2583]21INCLUDE(HandleLibraryTypes)
22
[2509]23FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
[2616]24  PATHS $ENV{OGRE_HOME}
[2647]25  PATH_SUFFIXES include include/OGRE Ogre.framework/Headers
[2509]26)
[2579]27FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
[2647]28  NAMES OgreMain Ogre
[2616]29  PATHS $ENV{OGRE_HOME}
30  PATH_SUFFIXES lib bin/Release bin/release Release release
[2579]31)
32FIND_LIBRARY(OGRE_LIBRARY_DEBUG
[2648]33  NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d
[2616]34  PATHS $ENV{OGRE_HOME}
[2647]35  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A
[2579]36)
[1505]37
[2616]38# Inspect OgrePrerquisites.h for the version number
39DETERMINE_VERSION(OGRE ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h)
40
41# Handle the REQUIRED argument and set OGRE_FOUND
42# Also check the version requirements
43FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION}
[2628]44  OGRE_LIBRARY_OPTIMIZED
[2616]45  OGRE_INCLUDE_DIR
[2509]46)
[1776]47
[2616]48# Collect optimized and debug libraries
[2614]49HANDLE_LIBRARY_TYPES(OGRE)
[2579]50
[2509]51MARK_AS_ADVANCED(
[2616]52  OGRE_INCLUDE_DIR
53  OGRE_LIBRARY_OPTIMIZED
54  OGRE_LIBRARY_DEBUG
[2509]55)
Note: See TracBrowser for help on using the repository browser.