CMake: Fix Threads::Threads global target promotion issue


Pick-to: 6.5
Fixes: QTBUG-110720
Change-Id: I064cab7afa662a53fe70938023aa7e994f1b7b84
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
commit381994598546131f262a3abac7fbcc325acfc7b5
parentdfe5cd7985d84d467184da9a6558e9affcf45866
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeTue, 31 Jan 2023 18:16:48 +0100