diff --git a/src/plugins/sqldrivers/psql/CMakeLists.txt b/src/plugins/sqldrivers/psql/CMakeLists.txt index 2de82be2f81..ab3d6c03aa7 100644 --- a/src/plugins/sqldrivers/psql/CMakeLists.txt +++ b/src/plugins/sqldrivers/psql/CMakeLists.txt @@ -24,3 +24,14 @@ qt_internal_add_plugin(QPSQLDriverPlugin #### Keys ignored in scope 1:.:.:psql.pro:: # OTHER_FILES = "psql.json" + +# PostgreSQL delivers header files that are not a part of PostgreSQL itself. When precompiled +# headers are processed, MinGW uses 'pthread.h' from the PostgreSQL installation directory. +# As result, we disable precompile headers for the plugin. +# See also QTBUG-90850. +if(MINGW) + set_target_properties(QPSQLDriverPlugin + PROPERTIES + DISABLE_PRECOMPILE_HEADERS ON + ) +endif()