Imported Upstream version 2.8.11.2
[platform/upstream/cmake.git] / Modules / Findosg.cmake
1 #
2 # NOTE: It is highly recommended that you use the new FindOpenSceneGraph.cmake
3 # introduced in CMake 2.6.3 and not use this Find module directly.
4 #
5 # This is part of the Findosg* suite used to find OpenSceneGraph components.
6 # Each component is separate and you must opt in to each module. You must
7 # also opt into OpenGL and OpenThreads (and Producer if needed) as these
8 # modules won't do it for you. This is to allow you control over your own
9 # system piece by piece in case you need to opt out of certain components
10 # or change the Find behavior for a particular module (perhaps because the
11 # default FindOpenGL.cmake module doesn't work with your system as an
12 # example).
13 # If you want to use a more convenient module that includes everything,
14 # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
15 #
16 # Locate osg
17 # This module defines
18 #
19 # OSG_FOUND - Was the Osg found?
20 # OSG_INCLUDE_DIR - Where to find the headers
21 # OSG_LIBRARIES - The libraries to link against for the OSG (use this)
22 #
23 # OSG_LIBRARY - The OSG library
24 # OSG_LIBRARY_DEBUG - The OSG debug library
25 #
26 # $OSGDIR is an environment variable that would
27 # correspond to the ./configure --prefix=$OSGDIR
28 # used in building osg.
29 #
30 # Created by Eric Wing.
31
32 #=============================================================================
33 # Copyright 2007-2009 Kitware, Inc.
34 #
35 # Distributed under the OSI-approved BSD License (the "License");
36 # see accompanying file Copyright.txt for details.
37 #
38 # This software is distributed WITHOUT ANY WARRANTY; without even the
39 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
40 # See the License for more information.
41 #=============================================================================
42 # (To distribute this file outside of CMake, substitute the full
43 #  License text for the above reference.)
44
45 # Header files are presumed to be included like
46 # #include <osg/PositionAttitudeTransform>
47 # #include <osgUtil/SceneView>
48
49 include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
50 OSG_FIND_PATH   (OSG osg/PositionAttitudeTransform)
51 OSG_FIND_LIBRARY(OSG osg)
52
53 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
54 FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)