diff options
Diffstat (limited to 'src/plugins/sqldrivers/psql/CMakeLists.txt')
-rw-r--r-- | src/plugins/sqldrivers/psql/CMakeLists.txt | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/plugins/sqldrivers/psql/CMakeLists.txt b/src/plugins/sqldrivers/psql/CMakeLists.txt index 62e9619d16..2f55ab4950 100644 --- a/src/plugins/sqldrivers/psql/CMakeLists.txt +++ b/src/plugins/sqldrivers/psql/CMakeLists.txt @@ -1,9 +1,7 @@ -# Generated from psql.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -# FIXME cmake FindPostgreSQL is more exhaustive than the check we have for libpq-fe.h -# it also checks for catalog/pg_type.h which is a more internal include, we should -# add a way to tell cmake FindPostgreSQL to optionally only look for the libpq-fe.h one -qt_find_package(PostgreSQL) # special case +qt_find_package(PostgreSQL) ##################################################################### ## QPSQLDriverPlugin Plugin: @@ -11,19 +9,28 @@ qt_find_package(PostgreSQL) # special case qt_internal_add_plugin(QPSQLDriverPlugin OUTPUT_NAME qsqlpsql - TYPE sqldrivers + PLUGIN_TYPE sqldrivers SOURCES main.cpp qsql_psql.cpp qsql_psql_p.h DEFINES QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII - PUBLIC_LIBRARIES + QT_NO_CONTEXTLESS_CONNECT + LIBRARIES PostgreSQL::PostgreSQL Qt::Core Qt::CorePrivate Qt::SqlPrivate ) -#### Keys ignored in scope 1:.:.:psql.pro:<TRUE>: -# 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() |