Unable to build VTK 9.4 with Qt 6.8

The error indicates that CMake couldn’t find Qt6QmlTools. Please check to make sure that the CMAKE_PREFIX_PATH points to a directory containing Qt5QmlToolsConfig.cmake file.

An alternative approach would be to disable the vtkGUISupportQtQuick module altogether if you don’t use vtk’s qml integration. You can do that via the cmake flag - VTK_MODULE_ENABLE_VTK_GUISupportQtQuick:STRING=NO.