I can't recompile wite an existing sample with OpenNI

Hello guys, I’ve tried to recompile a sample but I always get the “OPENNI2_INCLUDE is not defined. Please define it or ‘source’ the OpenNIDevEnvironment file from the installation.” Error message. Does anyone knows how to solve that?

export OPENNI_INCLUDE="[path_to_openni2_folder]/Include" && export OPENNI_REDIST="[path_to_openni2_folder]/Redist" before compiling should solve your problem