A typical openni2 distribution has the following file / OpenNI -Linux-Arm-2.2 / OpenNIDevEnvironment
He described all the necessary variables for compilation and reference:
export OPENNI2_INCLUDE=/opt/cbox/OpenNI-Linux-Arm-2.2/Include export OPENNI2_REDIST=/opt/cbox/OpenNI-Linux-Arm-2.2/Redist
So, you need to export these variables, and then run cmake with OpenNI2 enabled:
$export OPENNI2_INCLUDE=/opt/cbox/OpenNI-Linux-Arm-2.2/Include $export OPENNI2_REDIST=/opt/cbox/OpenNI-Linux-Arm-2.2/Redist $cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_OPENNI2=ON ..
Somewhere as a result of cmake you should see:
- OpenNI2: YES (version 2.2.0, build 33)
source share