diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-06-11 15:04:06 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-06-11 15:47:00 +0200 |
commit | 302b7b0d0e52879f74aa1b697e12414f0f51ca36 (patch) | |
tree | 51e8b45d6179540a9ed6663783aa1c525fccdc73 /tests/auto/linguist/lupdate/.prev_CMakeLists.txt | |
parent | 4be1823e4d459c89717e791ef27fd463ad04cb2b (diff) |
...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 <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/linguist/lupdate/.prev_CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions