FindosgDB.cmake 1.8 KB

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