FindosgWidget.cmake 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #.rst:
  2. # FindosgWidget
  3. # -------------
  4. #
  5. #
  6. #
  7. # This is part of the Findosg* suite used to find OpenSceneGraph
  8. # components. Each component is separate and you must opt in to each
  9. # module. You must also opt into OpenGL and OpenThreads (and Producer
  10. # if needed) as these modules won't do it for you. This is to allow you
  11. # control over your own system piece by piece in case you need to opt
  12. # out of certain components or change the Find behavior for a particular
  13. # module (perhaps because the default FindOpenGL.cmake module doesn't
  14. # work with your system as an example). If you want to use a more
  15. # convenient module that includes everything, use the
  16. # FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  17. #
  18. # Locate osgWidget This module defines
  19. #
  20. # OSGWIDGET_FOUND - Was osgWidget found? OSGWIDGET_INCLUDE_DIR - Where
  21. # to find the headers OSGWIDGET_LIBRARIES - The libraries to link for
  22. # osgWidget (use this)
  23. #
  24. # OSGWIDGET_LIBRARY - The osgWidget library OSGWIDGET_LIBRARY_DEBUG -
  25. # The osgWidget debug library
  26. #
  27. # $OSGDIR is an environment variable that would correspond to the
  28. # ./configure --prefix=$OSGDIR used in building osg.
  29. #
  30. # FindosgWidget.cmake tweaked from Findosg* suite as created by Eric
  31. # Wing.
  32. #=============================================================================
  33. # Copyright 2007-2009 Kitware, Inc.
  34. #
  35. # Distributed under the OSI-approved BSD License (the "License");
  36. # see accompanying file Copyright.txt for details.
  37. #
  38. # This software is distributed WITHOUT ANY WARRANTY; without even the
  39. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  40. # See the License for more information.
  41. #=============================================================================
  42. # (To distribute this file outside of CMake, substitute the full
  43. # License text for the above reference.)
  44. # Header files are presumed to be included like
  45. # #include <osg/PositionAttitudeTransform>
  46. # #include <osgWidget/Widget>
  47. include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
  48. OSG_FIND_PATH (OSGWIDGET osgWidget/Widget)
  49. OSG_FIND_LIBRARY(OSGWIDGET osgWidget)
  50. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  51. FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG
  52. OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR)