mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
fix reporting of postgres version
This commit is contained in:
parent
13082eb50d
commit
1deb1daf03
@ -23,9 +23,6 @@ if(${PostgreSQL_FOUND})
|
||||
set(POSTGRES_INCLUDE_DIR ${PostgreSQL_INCLUDE_DIRS})
|
||||
set(POSTGRES_LIBRARY ${PostgreSQL_LIBRARIES})
|
||||
set(POSTGRES_FOUND TRUE)
|
||||
if(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
|
||||
set(HAVE_PGCONFIG TRUE)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -118,11 +115,6 @@ ENDIF(WIN32 AND NOT ANDROID)
|
||||
|
||||
IF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
|
||||
SET(POSTGRES_FOUND TRUE)
|
||||
IF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
|
||||
SET(HAVE_PGCONFIG TRUE)
|
||||
ELSE(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
|
||||
SET(HAVE_PGCONFIG FALSE)
|
||||
ENDIF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
|
||||
ENDIF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
|
||||
|
||||
|
||||
|
@ -541,7 +541,7 @@ target_compile_features(qgis_app PRIVATE cxx_std_17)
|
||||
|
||||
target_compile_definitions(qgis_app PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"")
|
||||
if (POSTGRES_FOUND)
|
||||
target_compile_definitions(qgis_app PRIVATE -DPOSTGRESQL_VERSION=${PostgreSQL_VERSION_STRING})
|
||||
target_compile_definitions(qgis_app PRIVATE -DPOSTGRESQL_VERSION=\"${PostgreSQL_VERSION_STRING}\")
|
||||
endif()
|
||||
|
||||
target_include_directories(qgis_app PUBLIC
|
||||
|
@ -538,20 +538,10 @@
|
||||
|
||||
// Editor widgets
|
||||
#include "qgseditorwidgetregistry.h"
|
||||
|
||||
//
|
||||
// Conditional Includes
|
||||
//
|
||||
#ifdef HAVE_PGCONFIG
|
||||
#undef PACKAGE_BUGREPORT
|
||||
#undef PACKAGE_NAME
|
||||
#undef PACKAGE_STRING
|
||||
#undef PACKAGE_TARNAME
|
||||
#undef PACKAGE_VERSION
|
||||
#include <pg_config.h>
|
||||
#else
|
||||
#define PG_VERSION "unknown"
|
||||
#endif
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#ifdef HAVE_SPATIALITE
|
||||
@ -5579,7 +5569,7 @@ QString QgisApp::getVersionString()
|
||||
// postgres
|
||||
versionString += QStringLiteral( "<td>%1</td><td>" ).arg( tr( "PostgreSQL client version" ) );
|
||||
#ifdef HAVE_POSTGRESQL
|
||||
versionString += QStringLiteral( PG_VERSION );
|
||||
versionString += QStringLiteral( POSTGRESQL_VERSION );
|
||||
#else
|
||||
versionString += tr( "No support" );
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user