Is it possible to compile vtk 9.0 without opengl? The only thing we need is the IO module of legacy vtk files and binary xml vtk files (pvtp, vtp, pvtu, vtu, etc).
I found instructions about this from an email back in 2015: https://vtk.org/pipermail/vtkusers/2015-May/090922.html
Unfortunately, this doesn’t work anymore. CMake still complains that OpenGL is not found. Here is the output of CMake:
– Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR OpenGL)
CMake Error at CMake/vtkModule.cmake:4145 (message):
Could not find the OpenGL external dependency.
Call Stack (most recent call first):
CMake/vtkModule.cmake:4695 (vtk_module_find_package)
Utilities/OpenGL/CMakeLists.txt:58 (vtk_module_third_party_external)
I have the same issue but after some correction, configured & make
BUILD_DOCUMENTATION OFF
BUILD_EXAMPLES OFF
BUILD_SHARED_LIBS ON
BUILD_TESTING OFF
BUILD_USER_DEFINED_LIBS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/local
VTK_ANDROID_BUILD OFF
VTK_EXTRA_COMPILER_WARNINGS OFF
VTK_Group_Imaging OFF
VTK_Group_MPI OFF
VTK_Group_Qt OFF
VTK_Group_Rendering OFF
VTK_Group_StandAlone ON
VTK_Group_Tk OFF
VTK_Group_Views OFF
VTK_Group_Web OFF
VTK_IOS_BUILD OFF
VTK_PYTHON_VERSION 3
VTK_GLEXT_FILE /user/vtk/Utilities/ParseOGLExt/headers/glext.h
VTK_SMP_IMPLEMENTATION_TYPE Sequential
VTK_USE_LARGE_DATA OFF
VTK_WRAP_JAVA OFF
VTK_WRAP_PYTHON OFF
VTK_WRAP_TCL OFF
It looks as though you all didn’t need the OpenGL library, so you wanted to turn off the error message. Is that right? I ask because it seems as though OpenGL would be necessary for visualizing anything, and isn’t that VTK’s main function? I am having the same problem as you all in finding OpenGL, but I feel like I’ll need VTK to find the OpenGL library, so I can’t just ignore the error message.
I see that in VTK documentation it says that “when a library such as OpenGL library is not located in the expected place, you will have to tell CMake the correct setting”, but I can’t seem to find where OpenGL is, and I am not sure what command line argument I would use to show where it is. Does anyone have any suggestions?