PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 1ms 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
 1# -*- cmake -*-
 2
 3# - Find NDOF
 4# Find the NDOF includes and library
 5# This module defines
 6#  NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
 7#  NDOF_LIBRARY, the library needed to use NDOF.
 8#  NDOF_FOUND, If false, do not try to use NDOF.
 9
10find_path(NDOF_INCLUDE_DIR ndofdev_external.h
11  PATH_SUFFIXES ndofdev
12  )
13
14set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
15find_library(NDOF_LIBRARY
16  NAMES ${NDOF_NAMES}
17  )
18
19if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
20  set(NDOF_FOUND "YES")
21else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
22  set(NDOF_FOUND "NO")
23endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
24
25
26if (NDOF_FOUND)
27  if (NOT NDOF_FIND_QUIETLY)
28    message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
29  endif (NOT NDOF_FIND_QUIETLY)
30else (NDOF_FOUND)
31  if (NDOF_FIND_REQUIRED)
32    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 * * *")
33  endif (NDOF_FIND_REQUIRED)
34endif (NDOF_FOUND)
35
36mark_as_advanced(
37  NDOF_LIBRARY
38  NDOF_INCLUDE_DIR
39  )