Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
6.0
Description
We have a bunch of hardcoded find_package(Threads) + target_link_libraries(Threads::Threads) across multiple repos in different projects, to ensure linking works on Linux (mostly) by adding the -lpthread flag.
In qmake this is handled at the public mkspec level by loading qt.prf that does CONFIG += thread, and thread.prf adds the various flags in QMAKE_CFLAGS_THREAD, etc.
qt.prf is loaded both when building qt apps, as well as Qt itself. The CMake equivalent is the Qt6::Platform target.
We need to do the same, and remove all the hardcoded calls. This in turn ensure the proper -lpthread flag is added to the .prl files, so that qmake apps continue to work on Linux.
Attachments
Issue Links
- relates to
-
QTBUG-85240 Building examples with qmake / cmake using Qt 6.0.0 snapshot fails
- Closed