All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-10579: Fix NDOF.cmake to do the right thing on standalone.

Review Request #45 - Created Dec. 19, 2010 and submitted

Aleric Inglewood Reviewers
viewer
VWR-10579
None viewer-development
On standalone, only define -DLIB_NDOF=1 when NDOF can be found.
I can't remember when I started using this, but it was long ago. I don't have libndofdev installed.
I just installed Michelle's debian package libndofdev-dev and then it found it:
-- Found NDOF: Library in '/usr/lib/libndofdev.so' and header in '/usr/include' 

Diff revision 2 (Latest)

1 2
1 2

  1. indra/cmake/FindNDOF.cmake: Loading...
  2. indra/cmake/NDOF.cmake: Loading...
indra/cmake/FindNDOF.cmake
New 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

   

   
10
find_path(NDOF_INCLUDE_DIR ndofdev_external.h

   
11
  PATH_SUFFIXES ndofdev

   
12
  )

   
13

   

   
14
set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)

   
15
find_library(NDOF_LIBRARY

   
16
  NAMES ${NDOF_NAMES}

   
17
  )

   
18

   

   
19
if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)

   
20
  set(NDOF_FOUND "YES")

   
21
else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)

   
22
  set(NDOF_FOUND "NO")

   
23
endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)

   
24

   

   
25

   

   
26
if (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)

   
30
else (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)

   
34
endif (NDOF_FOUND)

   
35

   

   
36
mark_as_advanced(

   
37
  NDOF_LIBRARY

   
38
  NDOF_INCLUDE_DIR

   
39
  )
indra/cmake/NDOF.cmake
Revision b0689af42a71 New Change
 
  1. indra/cmake/FindNDOF.cmake: Loading...
  2. indra/cmake/NDOF.cmake: Loading...