Configuration with MESA enabled is a nightmare
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Currently you have to set the following flags to properly build with OSMesa.
VTK_OPENGL_HAS_OSMESA is enabled. OPENGL_INCLUDE_DIR set to OSMesa library OPENGL_gl_LIBRARY is empty if you want offscreen rendering OPENGL_glu_LIBRARY set the to library built by OSMesa VTK_USE_X is turned off
Ontop of that VTK_USE_X doesn't properly clear itself once it is toggled on, so if that happens you need to blow away the entire build directory.
We really should have a single non advanced option which is ENABLE_OSMESA which does everything for the end user.