PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/cmake/NDOF.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 32 lines | 25 code | 6 blank | 1 comment | 6 complexity | 25a4f34ef3c614f567275c4ac22fbb99 MD5 | raw file
 1# -*- cmake -*-
 2include(Prebuilt)
 3
 4set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
 5
 6if (NDOF)
 7  if (STANDALONE)
 8    set(NDOF_FIND_REQUIRED ON)
 9    include(FindNDOF)
10  else (STANDALONE)
11    use_prebuilt_binary(ndofdev)
12
13    if (WINDOWS)
14      set(NDOF_LIBRARY libndofdev)
15    elseif (DARWIN OR LINUX)
16      set(NDOF_LIBRARY ndofdev)
17    endif (WINDOWS)
18
19    set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
20    set(NDOF_FOUND 1)
21  endif (STANDALONE)
22endif (NDOF)
23
24if (NDOF_FOUND)
25  add_definitions(-DLIB_NDOF=1)
26  include_directories(${NDOF_INCLUDE_DIR})
27else (NDOF_FOUND)
28  message(STATUS "Building without N-DoF joystick support")
29  set(NDOF_INCLUDE_DIR "")
30  set(NDOF_LIBRARY "")
31endif (NDOF_FOUND)
32