VTK (6.3.0) build for android without OpenGL and Rendering
Hello,
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.
- CMake version 3.25.2.
- I am changing the path of cmake the toolchain to the one in android.
- Android NDK version r23b for arm64-v8a with native API level 31.
The build ultimately fails with an OPENGL_INCLUDE_DIR not found error. This can be traced back to the find_package(Opengl) in vtkglew module.
I do not want OpenGL itself to build. I have read the following thread but does not seem to work for the same reason mentioned above: https://public.kitware.com/pipermail/vtkusers/2015-May/090922.html
I have been stuck on this for a while and I would really appreciate suggestions.
Thanks in advance!