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