FindosgQt.cmake 1.9 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. FindosgQt
  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 osgQt This module defines:
  17. ``OSGQT_FOUND``
  18. Was osgQt found?
  19. ``OSGQT_INCLUDE_DIR``
  20. Where to find the headers
  21. ``OSGQT_LIBRARIES``
  22. The libraries to link for osgQt (use this)
  23. ``OSGQT_LIBRARY``
  24. The osgQt library
  25. ``OSGQT_LIBRARY_DEBUG``
  26. The osgQt debug library
  27. ``$OSGDIR`` is an environment variable that would correspond to::
  28. ./configure --prefix=$OSGDIR
  29. used in building osg.
  30. Created by Eric Wing. Modified to work with osgQt by Robert Osfield,
  31. January 2012.
  32. #]=======================================================================]
  33. # Header files are presumed to be included like
  34. # #include <osg/PositionAttitudeTransform>
  35. # #include <osgQt/GraphicsWindowQt>
  36. include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
  37. OSG_FIND_PATH (OSGQT osgQt/GraphicsWindowQt)
  38. OSG_FIND_LIBRARY(OSGQT osgQt)
  39. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  40. find_package_handle_standard_args(osgQt DEFAULT_MSG
  41. OSGQT_LIBRARY OSGQT_INCLUDE_DIR)