FindMotif.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #.rst:
  2. # FindMotif
  3. # ---------
  4. #
  5. # Try to find Motif (or lesstif)
  6. #
  7. # Once done this will define:
  8. #
  9. # ::
  10. #
  11. # MOTIF_FOUND - system has MOTIF
  12. # MOTIF_INCLUDE_DIR - include paths to use Motif
  13. # MOTIF_LIBRARIES - Link these to use Motif
  14. #=============================================================================
  15. # Copyright 2005-2009 Kitware, Inc.
  16. #
  17. # Distributed under the OSI-approved BSD License (the "License");
  18. # see accompanying file Copyright.txt for details.
  19. #
  20. # This software is distributed WITHOUT ANY WARRANTY; without even the
  21. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  22. # See the License for more information.
  23. #=============================================================================
  24. # (To distribute this file outside of CMake, substitute the full
  25. # License text for the above reference.)
  26. set(MOTIF_FOUND 0)
  27. if(UNIX)
  28. find_path(MOTIF_INCLUDE_DIR
  29. Xm/Xm.h
  30. /usr/openwin/include
  31. )
  32. find_library(MOTIF_LIBRARIES
  33. Xm
  34. /usr/openwin/lib
  35. )
  36. endif()
  37. # handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
  38. # all listed variables are TRUE
  39. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  40. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
  41. mark_as_advanced(
  42. MOTIF_INCLUDE_DIR
  43. MOTIF_LIBRARIES
  44. )