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
...if find_package(Qt6Core) is missing at the project directory level.
Consider a project with a subdir. In the subdir, we have
find_package(Qt6 COMPONENTS Widgets LinguistTools ...)
...
qt_add_translations(mytarget TS_FILES mytarget_de.ts ...)
such that the actual qt_add_translations call is deferred.
In the top-level CMakeLists.txt we have no find_package call for Qt6.
Then the deferred call will fail, because we defer to the project root,
and there we're missing variables that have been pulled in by the
find_package(Qt6 ...) call in the subdir.
Fix this by adding a find_package(Qt6 ...) call when we're deferring
qt_add_translations. The find_package call will do (almost) nothing if
the packages have already been loaded.
Pick-to: 6.7 6.8
Fixes: QTBUG-126167
Change-Id: I2083ebecfd64e67649906526d2f99bb202b03cb8
Reviewed-by: Alexandru Croitor <[email protected]>
0 commit comments