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