To solve the following errors, put a blank "opengl_xmesa_include" in cmake. I have NVIDIA drivers and everything works fine after this.
make[1]: *** [core/vgui/tests/CMakeFiles/vgui_test_events.dir/all] Error 2 Linking CXX executable vgui_test_front_back /home/rfabbri/cprg/vxlprg/vxl-bin/lib/libvgui.a(vgui_accelerate_x11.o): In function `vgui_accelerate_x11::vgui_copy_back_to_aux()': /home/rfabbri/cprg/vxlprg/vxl/core/vgui/internals/vgui_accelerate_x11.cxx:426: undefined reference to `XMesaGetCurrentBuffer' /home/rfabbri/cprg/vxlprg/vxl/core/vgui/internals/vgui_accelerate_x11.cxx:435: undefined reference to `XMesaGetBackBuffer' /home/rfabbri/cprg/vxlprg/vxl-bin/lib/libvgui.a(vgui_accelerate_x11.o): In function `vgui_accelerate_x11::vgui_copy_aux_to_back()': /home/rfabbri/cprg/vxlprg/vxl/core/vgui/internals/vgui_accelerate_x11.cxx:458: undefined reference to `XMesaGetCurrentBuffer' /home/rfabbri/cprg/vxlprg/vxl/core/vgui/internals/vgui_accelerate_x11.cxx:467: undefined reference to `XMesaGetBackBuffer'