VTK build for android without OpenGL and Rendering


I am trying to build VTK 6.3.0 for Android. I wish to disable all the Rendering modules and build it without OpenGL. I saw the file vtkAndroid.cmake and it contains two builds. One is the minimal build on the host machine (to build compile tools) and the other is the target android build. VTK does not seem to acknowledge the flags passed in vtkAndroid.cmake. Despite setting all Rendering modules and groups to OFF, the build system sets the OpenGL backend and enables the opengl modules to be built.

I have tried setting the flags to OFF via the cmake command that I use to build, modifying them in the vtkAndroid.cmake file as well as commenting out the opengl find_package within the top level CMakeLists. The build system does not seem to acknowledge the flags. I am using cmake version 3.25.2.

The build ultimately fails with a OPENGL_INCLUDE_DIR not found error. I do not want OpenGL itself to build.

I have read this thread but does not seem to work for the same reason mentioned above.
[vtkusers] building vtk without opengl and rendering (kitware.com)

I have been stuck on this for a while and I would really appreciate suggestions.

Thanks in advance!

Have you tried building for a another OS (Linux,Mac,Windows) without rendering and OpenGL?

It may be that there is an unwanted dependency due to the incorrect inclusion of a source header somewhere. In that case you should log an issue here. https://gitlab.kitware.com/vtk/vtk/-/issues

Yes, I just tried building on Linux with the rendering modules and group off. It still builds those modules with OpenGL. Let me try creating an issue.

Thank you!