Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2573 was 2568, checked in by rgrieder, 16 years ago

Small adjustments.
Added OGRE_HOME environemnt variable to the path to look for ogre libarary. This is the standard variable Ogre recommends.

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1# Find OGRE includes and library
2#
3# This module defines
4#  OGRE_INCLUDE_DIR
5#  OGRE_LIBRARY, the library to link against to use OGRE.
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.
12#
13# Several changes and additions by Fabian 'x3n' Landau
14# Lots of simplifications by Adrian Friedli
15#                 > www.orxonox.net <
16
17FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
18    PATHS
19    $ENV{OGREDIR}
20    $ENV{OGRE_HOME}
21    /usr/local
22    /usr
23    PATH_SUFFIXES include include/OGRE
24)
25
26IF(WIN32)
27    FIND_LIBRARY(OGRE_LIBRARY_
28        NAMES OgreMain
29        PATHS
30        $ENV{OGREDIR}
31        $ENV{OGRE_HOME}
32        PATH_SUFFIXES lib
33    )
34    FIND_LIBRARY(OGRE_LIBRARY_d
35        NAMES OgreMain_d
36        PATHS
37        $ENV{OGREDIR}
38        $ENV{OGRE_HOME}
39        PATH_SUFFIXES lib
40    )
41    IF(OGRE_LIBRARY_)
42        IF(OGRE_LIBRARY_d)
43            SET(OGRE_LIBRARY optimized ${OGRE_LIBRARY_} debug ${OGRE_LIBRARY_d})
44        ELSE(OGRE_LIBRARY_d)
45            SET(OGRE_LIBRARY ${OGRE_LIBRARY_})
46        ENDIF(OGRE_LIBRARY_d)
47    ENDIF(OGRE_LIBRARY_)
48ELSE(WIN32)
49    FIND_LIBRARY(OGRE_LIBRARY
50        NAMES OgreMain
51        PATHS
52        $ENV{OGREDIR}
53        $ENV{OGRE_HOME}
54        /usr/local
55        /usr
56        PATH_SUFFIXES lib
57    )
58ENDIF(WIN32)
59
60INCLUDE(FindPackageHandleStandardArgs)
61FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGRE DEFAULT_MSG
62    OGRE_LIBRARY
63    OGRE_INCLUDE_DIR
64)
65
66MARK_AS_ADVANCED(
67    OGRE_LIBRARY
68    OGRE_LIBRARY_
69    OGRE_LIBRARY_d
70    OGRE_INCLUDE_DIR
71)
Note: See TracBrowser for help on using the repository browser.