~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to cmake/Modules/FindosgShadow.cmake

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This is part of the Findosg* suite used to find OpenSceneGraph components.
 
2
# Each component is separate and you must opt in to each module. You must 
 
3
# also opt into OpenGL and OpenThreads (and Producer if needed) as these 
 
4
# modules won't do it for you. This is to allow you control over your own 
 
5
# system piece by piece in case you need to opt out of certain components
 
6
# or change the Find behavior for a particular module (perhaps because the
 
7
# default FindOpenGL.cmake module doesn't work with your system as an
 
8
# example).
 
9
# If you want to use a more convenient module that includes everything,
 
10
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
 
11
 
12
# Locate osgShadow
 
13
# This module defines
 
14
# OSGSHADOW_LIBRARY
 
15
# OSGSHADOW_FOUND, if false, do not try to link to osgShadow
 
16
# OSGSHADOW_INCLUDE_DIR, where to find the headers
 
17
#
 
18
# $OSGDIR is an environment variable that would
 
19
# correspond to the ./configure --prefix=$OSGDIR
 
20
# used in building osg.
 
21
#
 
22
# Created by Eric Wing.
 
23
 
 
24
# Header files are presumed to be included like
 
25
# #include <osg/PositionAttitudeTransform>
 
26
# #include <osgShadow/ShadowTexture>
 
27
 
 
28
# Try the user's environment request before anything else.
 
29
FIND_PATH(OSGSHADOW_INCLUDE_DIR osgShadow/ShadowTexture
 
30
  HINTS
 
31
  $ENV{OSGSHADOW_DIR}
 
32
  $ENV{OSG_DIR}
 
33
  $ENV{OSGDIR}
 
34
  PATH_SUFFIXES include
 
35
  PATHS
 
36
    ~/Library/Frameworks
 
37
    /Library/Frameworks
 
38
    /usr/local
 
39
    /usr
 
40
    /sw # Fink
 
41
    /opt/local # DarwinPorts
 
42
    /opt/csw # Blastwave
 
43
    /opt
 
44
    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
 
45
    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
 
46
)
 
47
 
 
48
FIND_LIBRARY(OSGSHADOW_LIBRARY 
 
49
  NAMES osgShadow
 
50
  HINTS
 
51
  $ENV{OSGSHADOW_DIR}
 
52
  $ENV{OSG_DIR}
 
53
  $ENV{OSGDIR}
 
54
  PATH_SUFFIXES lib64 lib
 
55
  PATHS
 
56
    ~/Library/Frameworks
 
57
    /Library/Frameworks
 
58
  /usr/local
 
59
  /usr
 
60
  /sw
 
61
  /opt/local
 
62
  /opt/csw
 
63
  /opt
 
64
)
 
65
 
 
66
FIND_LIBRARY(OSGSHADOW_LIBRARY_DEBUG 
 
67
  NAMES osgShadowd
 
68
  HINTS
 
69
  $ENV{OSGSHADOW_DIR}
 
70
  $ENV{OSG_DIR}
 
71
  $ENV{OSGDIR}
 
72
  PATH_SUFFIXES lib64 lib
 
73
  PATHS
 
74
    ~/Library/Frameworks
 
75
    /Library/Frameworks
 
76
  /usr/local
 
77
  /usr
 
78
  /sw
 
79
  /opt/local
 
80
  /opt/csw
 
81
  /opt
 
82
)
 
83
 
 
84
SET(OSGSHADOW_FOUND "NO")
 
85
IF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
 
86
  SET(OSGSHADOW_FOUND "YES")
 
87
ENDIF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
 
88