FindMotif.cmake 917 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. FindMotif
  5. ---------
  6. Try to find Motif (or lesstif)
  7. Once done this will define:
  8. ::
  9. MOTIF_FOUND - system has MOTIF
  10. MOTIF_INCLUDE_DIR - include paths to use Motif
  11. MOTIF_LIBRARIES - Link these to use Motif
  12. #]=======================================================================]
  13. set(MOTIF_FOUND 0)
  14. if(UNIX)
  15. find_path(MOTIF_INCLUDE_DIR
  16. Xm/Xm.h
  17. /usr/openwin/include
  18. )
  19. find_library(MOTIF_LIBRARIES
  20. Xm
  21. /usr/openwin/lib
  22. )
  23. endif()
  24. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  25. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
  26. mark_as_advanced(
  27. MOTIF_INCLUDE_DIR
  28. MOTIF_LIBRARIES
  29. )