diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/plugins/sqldrivers/sqlite/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/testlib/CMakeLists.txt | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 0702c32170..a4890f9bc9 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -249,7 +249,6 @@ qt_add_module(Core ../3rdparty/tinycbor/src LIBRARIES Qt::GlobalConfigPrivate # special case - Threads::Threads # special case PRECOMPILED_HEADER "global/qt_pch.h" NO_PCH_SOURCES @@ -276,6 +275,13 @@ endif() qt_generate_qconfig_cpp() +# Handle qtConfig(thread): CONFIG += thread like in qt.prf. +# Aka if the feature is enabled, publically link against the threading library. +# This also ensures the link flag is in the .prl file. +if(QT_FEATURE_thread) + target_link_libraries(Platform INTERFACE Threads::Threads) +endif() + # Handle QObject: Automoc does not work for this as it would # require to spill internals into users: qt_add_module(Core_qobject STATIC diff --git a/src/plugins/sqldrivers/sqlite/CMakeLists.txt b/src/plugins/sqldrivers/sqlite/CMakeLists.txt index 5cc2791e7d..154516b5ff 100644 --- a/src/plugins/sqldrivers/sqlite/CMakeLists.txt +++ b/src/plugins/sqldrivers/sqlite/CMakeLists.txt @@ -33,7 +33,6 @@ qt_extend_target(QSQLiteDriverPlugin CONDITION QT_FEATURE_system_sqlite # special case begin if (NOT QT_FEATURE_system_sqlite) - qt_find_package(Threads REQUIRED PROVIDED_TARGETS Threads::Threads) # On newer compilers compiling sqlite.c produces warnings qt_disable_warnings(QSQLiteDriverPlugin) endif() @@ -52,8 +51,6 @@ qt_extend_target(QSQLiteDriverPlugin CONDITION NOT QT_FEATURE_system_sqlite SQLITE_OMIT_COMPLETE INCLUDE_DIRECTORIES ../../../3rdparty/sqlite - PUBLIC_LIBRARIES # special case - Threads::Threads # special case ) qt_extend_target(QSQLiteDriverPlugin CONDITION CMAKE_BUILD_TYPE STREQUAL Release AND NOT QT_FEATURE_system_sqlite diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt index 22df4c93b4..226bf079b8 100644 --- a/src/testlib/CMakeLists.txt +++ b/src/testlib/CMakeLists.txt @@ -62,7 +62,6 @@ qt_add_module(Test QT_BUILD_TESTLIB_LIB # special case LIBRARIES Qt::CorePrivate - Threads::Threads # special case PUBLIC_LIBRARIES Qt::Core PRIVATE_MODULE_INTERFACE |