FindNDOF.cmake 979 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- cmake -*-
  2. # - Find NDOF
  3. # Find the NDOF includes and library
  4. # This module defines
  5. # NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
  6. # NDOF_LIBRARY, the library needed to use NDOF.
  7. # NDOF_FOUND, If false, do not try to use NDOF.
  8. find_path(NDOF_INCLUDE_DIR ndofdev_external.h
  9. PATH_SUFFIXES ndofdev
  10. )
  11. set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
  12. find_library(NDOF_LIBRARY
  13. NAMES ${NDOF_NAMES}
  14. )
  15. if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
  16. set(NDOF_FOUND "YES")
  17. else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
  18. set(NDOF_FOUND "NO")
  19. endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
  20. if (NDOF_FOUND)
  21. if (NOT NDOF_FIND_QUIETLY)
  22. message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
  23. endif (NOT NDOF_FIND_QUIETLY)
  24. else (NDOF_FOUND)
  25. if (NDOF_FIND_REQUIRED)
  26. message(FATAL_ERROR "Could not find NDOF library!")
  27. endif (NDOF_FIND_REQUIRED)
  28. endif (NDOF_FOUND)
  29. mark_as_advanced(
  30. NDOF_LIBRARY
  31. NDOF_INCLUDE_DIR
  32. )