You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: (cmake) Correctly set QT_VERSION_MAJOR and find Qt6 private modules
The previous CMake logic used `find_package(QT NAMES Qt6 ...)` followed by
`if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10)` to conditionally find private
modules, but `Qt6_VERSION` is not set by this call. As a result, Qt6 private
modules (CorePrivate, GuiPrivate, WidgetsPrivate) were never found, causing
link errors on targets depending on them.
This patch updates the logic to:
- Set `QT_VERSION_MAJOR` and `QT_VERSION_MINOR` based on the public Qt6/Qt5
version variables, preserving existing version checks in the project.
- Conditionally find Qt6 private modules using `find_package(Qt6 CONFIG REQUIRED
COMPONENTS CorePrivate GuiPrivate WidgetsPrivate)` when Qt6 >= 6.10.
- Maintain compatibility with Qt5 builds.
This ensures private modules are correctly linked when available and
prevents undefined reference errors.
0 commit comments