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