Use e.g. Qt6::Core instead of Qt::Core. This is better matching the find_package(Qt6 ...) call, and also avoids issues that the versionless targets have. Pick-to: 6.5 Task-number: QTBUG-113277 Change-Id: Ib4373036092163518a611bd5c688591d18096d7e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>