Consider versioned targets when checking the existens in __qt_internal_walk_libs

Since Qt targets now are linked as versioned targets by default, we
should adjust the respective check in __qt_internal_walk_libs.

Pick-to: 6.7
Change-Id: Idb896c1d9eda944a06d57b0491686cd78e010df0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-04-05 14:17:58 +02:00
parent 337cadbcb7
commit 721cfbd194

View File

@ -255,8 +255,8 @@ function(__qt_internal_walk_libs
__qt_internal_promote_target_to_global(${lib_target_unaliased}) __qt_internal_promote_target_to_global(${lib_target_unaliased})
endif() endif()
endif() endif()
elseif("${lib_target}" MATCHES "^Qt::(.*)") elseif("${lib_target}" MATCHES "^(Qt|${QT_CMAKE_EXPORT_NAMESPACE})::(.*)")
message(FATAL_ERROR "The ${CMAKE_MATCH_1} target is mentioned as a dependency for \ message(FATAL_ERROR "The ${CMAKE_MATCH_2} target is mentioned as a dependency for \
${target}, but not declared.") ${target}, but not declared.")
else() else()
if(NOT operation MATCHES "^(collect|direct)_targets$") if(NOT operation MATCHES "^(collect|direct)_targets$")