cmake warnings related to PlatformGraphicsConfig.cmake

Hello,

I am building VTK 9.2.2 with Qt 6.8.1. And I am getting the following CMake warnings related to PlatformGraphicsConfig.cmake.

I tried the following flags, but it did not fix the warnings.

-DVTK_OPENGL_HAS_EGL=OFF -DVTK_USE_X=ON -DVTK_OPENGL_HAS_OSMESA=OFF

How can I fix this warning message?

Thanks!

CMake Warning at /usr/local/Qt-6.8.1/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake:123 (find_package):
  By not providing "FindPlatformGraphics.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "PlatformGraphics", but CMake did not find one.

  Could not find a package configuration file provided by "PlatformGraphics"
  with any of the following names:

    PlatformGraphicsConfig.cmake
    platformgraphics-config.cmake

  Add the installation prefix of "PlatformGraphics" to CMAKE_PREFIX_PATH or
  set "PlatformGraphics_DIR" to a directory containing one of the above
  files.  If "PlatformGraphics" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:36 (find_dependency)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:42 (_qt_internal_find_third_party_dependencies)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:43 (include)
  /usr/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:143 (find_dependency)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6OpenGL/Qt6OpenGLDependencies.cmake:43 (_qt_internal_find_qt_dependencies)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6OpenGL/Qt6OpenGLConfig.cmake:43 (include)
  /usr/local/Qt-6.8.1/lib/cmake/Qt6/Qt6Config.cmake:181 (find_package)
  /usr/local/lib/cmake/vtk-9.2/VTK-vtk-module-find-packages.cmake:491 (find_package)
  /usr/local/lib/cmake/vtk-9.2/vtk-config.cmake:152 (include)
  CMakeLists.txt:63 (find_package)

AFAIK, the Gui module of Qt6 is always required, so it’ll need to find its dependencies.

Cc: @sankhesh

@amkovt That error seems to indicate an issue with your Qt installation.