Merge topic 'cxx-checks-tolerate-unused-arguments'
[kiteware-cmake.git] / Modules / FindosgDB.cmake
blob9366d21c9cf80edee0dfcdb9848c1d502469e739
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 FindosgDB
6 ---------
10 This is part of the ``Findosg*`` suite used to find OpenSceneGraph
11 components.  Each component is separate and you must opt in to each
12 module.  You must also opt into OpenGL and OpenThreads (and Producer
13 if needed) as these modules won't do it for you.  This is to allow you
14 control over your own system piece by piece in case you need to opt
15 out of certain components or change the Find behavior for a particular
16 module (perhaps because the default :module:`FindOpenGL` module doesn't
17 work with your system as an example).  If you want to use a more
18 convenient module that includes everything, use the
19 :module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
21 Locate osgDB This module defines:
23 ``OSGDB_FOUND``
24   Was osgDB found?
26 ``OSGDB_INCLUDE_DIR``
27   Where to find the headers
29 ``OSGDB_LIBRARIES``
30   The libraries to link against for the osgDB
32 ``OSGDB_LIBRARY``
33   The osgDB library
35 ``OSGDB_LIBRARY_DEBUG``
36   The osgDB debug library
38 ``$OSGDIR`` is an environment variable that would correspond to::
40   ./configure --prefix=$OSGDIR
42 used in building osg.
44 #]=======================================================================]
46 # Header files are presumed to be included like
47 # #include <osg/PositionAttitudeTransform>
48 # #include <osgDB/DatabasePager>
50 include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
51 OSG_FIND_PATH   (OSGDB osgDB/DatabasePager)
52 OSG_FIND_LIBRARY(OSGDB osgDB)
54 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
55 FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgDB DEFAULT_MSG
56     OSGDB_LIBRARY OSGDB_INCLUDE_DIR)