PageRenderTime 43ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/cmake/FindNDOF.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 39 lines | 25 code | 7 blank | 7 comment | 6 complexity | 5876735ef671933e6650d1ed48890f6f MD5 | raw file
Possible License(s): LGPL-2.1
  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 " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *")
  27. endif (NDOF_FIND_REQUIRED)
  28. endif (NDOF_FOUND)
  29. mark_as_advanced(
  30. NDOF_LIBRARY
  31. NDOF_INCLUDE_DIR
  32. )