diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-05-27 15:14:00 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-01 16:29:15 +0200 |
commit | bc80067266625db3ce05564e27ffcedfc0092ca3 (patch) | |
tree | 8ce16bae2524c539b66bfcd795cb8de6d66f4471 /cmake/QtModuleToolsVersionlessTargets.cmake.in | |
parent | 6c1a9f2b4d4e0d2bcea0989c852ed1c653588154 (diff) |
CMake: Create global imported versionless tool targets
Versioned tool targets are always promoted to global targets.
Versionless ones were not promoted to global targets.
This was an oversight which caused issues with conditions like
if(TARGET Qt::Tool) in top-level builds.
Fixes: QTBUG-93839
Change-Id: I5176899b5d0d80bfd0b350bc9c4b3fa5b53c0777
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleToolsVersionlessTargets.cmake.in')
-rw-r--r-- | cmake/QtModuleToolsVersionlessTargets.cmake.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtModuleToolsVersionlessTargets.cmake.in b/cmake/QtModuleToolsVersionlessTargets.cmake.in index 6d0f57e039..0cf554c34a 100644 --- a/cmake/QtModuleToolsVersionlessTargets.cmake.in +++ b/cmake/QtModuleToolsVersionlessTargets.cmake.in @@ -1,6 +1,6 @@ foreach(__qt_tool @tool_targets_non_prefixed@) if(NOT TARGET Qt::${__qt_tool} AND TARGET Qt6::${__qt_tool}) - add_executable(Qt::${__qt_tool} IMPORTED) + add_executable(Qt::${__qt_tool} IMPORTED GLOBAL) # Check all the usual imported location properties to find one that contains a path. foreach(__qt_imported_location_config |