In CMake, how to get the Qt install (include dir, libraries, etc) associated with vtkGUISupportQt?
Basically, I use a library (PCL) that is based on vtkGUISupportQt.
find_package(PCL 1.7.1 COMPONENTS visualization REQUIRED)
find_package(VTK 7 COMPONENTS vtkCommonCore vtkGUISupportQt REQUIRED)
Now to add a GUI in the project, I need Qt. To avoid problems (runtime crash, …), I actually need the Qt install which was used to build vtkGUISupportQt (Qt::Widgets targets used by VTK to build vtkGUISupportQt): does the VTK find_package allow to retrieve the Qt::Widgets targets used to build vtkGUISupportQt? If yes, how to get them (all targets involved)?
In other words, can I ask VTK: “what is the Qt you used to provide vtkGUISupportQt because I need to used this exact same Qt to build GUI on top of it?”
Note: when I just find_package(Qt REQUIRED)
I may end up with Qt::Widgets from Qt6 which will conflict with vtkGUISupportQt (which was built with Qt5 for instance) and trigger this kind of cmake error “CMake Error: The INTERFACE_QT_MAJOR_VERSION property of “Qt5::Core” does not agree with the value of QT_MAJOR_VERSION already determined for”