if(WITH_OPENNI2)
  pkg_check_modules(OPENNI2 REQUIRED libopenni2)
  if(${OPENNI2_FOUND})
    set(OPENNI2_LIBRARIES "${OPENNI2_LIBRARY}")
    set(OPENNI2_INCLUDE_DIRS "${OPENNI2_INCLUDE_DIR}")
    set(HAVE_OPENNI2 TRUE)
  endif()
endif()
