Before compiling a similar problem in the compilation of OpenCV, the results of the Cmake-gui configuration generated on the line, and recently appeared in the compilation of KINECTV2, and Cmake-gui can not solve, so explore the following solution.
An error occurred while compiling the KINECTV2
MAKE[2]: * * * There are no rules to create the "lib/libfreenect2.so.0.2.0" required target "/usr/lib/x86_64-linux-gnu/libgl.so". Stop it.
Workaround: Link the corresponding file via Ln-s
First locate Libgl
Then select the corresponding file link (I was trying out): sudo ln-s/usr/lib/libgl.so.1/usr/lib/x86_64-linux-gnu/libgl.so
Where: ln-s source file Destination file
If: ln: Cannot create symbolic link "/usr/lib/x86_64-linux-gnu/libgl.so": File already exists
First remove: sudo rm/usr/lib/x86_64-linux-gnu/libgl.so, and then link. Backup before removing: sudo nautilus (perform administrator privileges)
The following diagram is my procedure: