Skip to content

Commit

Permalink
fix postgres <8.3 support
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9943 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 8, 2009
1 parent 816478d commit 9dbbec4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmake/FindPostgres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ ENDIF(WIN32)

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)


Expand Down
4 changes: 4 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ SET (QGIS_APP_MOC_HDRS
)

IF (POSTGRES_FOUND)
IF(HAVE_PGCONFIG)
ADD_DEFINITIONS(-DHAVE_PGCONFIG=1)
ENDIF(HAVE_PGCONFIG)

SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
qgsdbsourceselect.cpp
qgsnewconnection.cpp
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsdbsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ email : sherman at mrcc.com
#include <cassert>
#include <iostream>

#ifdef HAVE_PGCONFIG
#include <pg_config.h>
#endif

QgsDbSourceSelect::QgsDbSourceSelect( QWidget *parent, Qt::WFlags fl )
: QDialog( parent, fl ), mColumnTypeThread( NULL ), pd( 0 )
Expand Down

0 comments on commit 9dbbec4

Please sign in to comment.