mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
Added OpenNI2 camera
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1363 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# - Find OpenNI2
|
||||
# This module finds an installed OpenNI2 package.
|
||||
#
|
||||
# It sets the following variables:
|
||||
# OpenNI2_FOUND - Set to false, or undefined, if OpenNI2 isn't found.
|
||||
# OpenNI2_INCLUDE_DIRS - The OpenNI2 include directory.
|
||||
# OpenNI2_LIBRARIES - The OpenNI2 library to link against.
|
||||
|
||||
FIND_PATH(OpenNI2_INCLUDE_DIRS OpenNI.h HINTS $ENV{OPENNI2_INCLUDE64} $ENV{OPENNI2_INCLUDE})
|
||||
|
||||
FIND_LIBRARY(OpenNI2_LIBRARY NAMES OpenNI2 HINTS $ENV{OPENNI2_LIB64} $ENV{OPENNI2_LIB})
|
||||
|
||||
IF (OpenNI2_INCLUDE_DIRS AND OpenNI2_LIBRARY)
|
||||
SET(OpenNI2_FOUND TRUE)
|
||||
ENDIF (OpenNI2_INCLUDE_DIRS AND OpenNI2_LIBRARY)
|
||||
|
||||
IF (OpenNI2_FOUND)
|
||||
# show which OpenNI2 was found only if not quiet
|
||||
SET(OpenNI2_LIBRARIES ${OpenNI2_LIBRARY})
|
||||
IF (NOT OpenNI2_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found OpenNI2")
|
||||
ENDIF (NOT OpenNI2_FIND_QUIETLY)
|
||||
ELSE (OpenNI2_FOUND)
|
||||
# fatal error if OpenNI2 is required but not found
|
||||
IF (OpenNI2_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find OpenNI2")
|
||||
ENDIF (OpenNI2_FIND_REQUIRED)
|
||||
ENDIF (OpenNI2_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user