I wanted to rebuild one of my test code in which I used Xition as the input device and it needed OpenNI2. When running ``make'' the system complained that it couldn't find pcl/io/openni2_grabber.h. I checked and found the head file was in the source package but not in the corresponding system folder. So it was something wrong with the make files.
The solution is to turn on the flag BUILD_OPENNI2 which has OFF as the default value. I used
$ grep -r "BUILD_OPENNI2" .to find it was in the file of CMakeCache.txt. Then just changed the value of from OFF to ON and did make && sudo make install again.