mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-18 00:06:00 -04:00
Modifications to allow compilation under windows
git-svn-id: http://svn.osgeo.org/qgis/trunk@1603 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
bf22f75eab
commit
48b01324d1
23
providers/postgres/postgres.pro
Executable file
23
providers/postgres/postgres.pro
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
######################################################################
|
||||||
|
Qmake project file for building the postgres provider.
|
||||||
|
This file is needed for building on Windows
|
||||||
|
######################################################################
|
||||||
|
# postgres.pro,v 1.1 2004/06/17 04:27:07 gsherman Exp
|
||||||
|
|
||||||
|
TEMPLATE = lib
|
||||||
|
INCLUDEPATH += . \
|
||||||
|
C:\Development\qgis_win32\src \
|
||||||
|
C:\Development\postgresql-7.4.3\src\interfaces\libpq \
|
||||||
|
C:\Development\postgresql-7.4.3\src\include
|
||||||
|
LIBS += C:\Development\postgresql-7.4.3\src\interfaces\libpq\Release\libpq.lib
|
||||||
|
|
||||||
|
CONFIG += qt dll thread
|
||||||
|
DLLDESTDIR= ..\..\src\lib\qgis
|
||||||
|
# Input
|
||||||
|
HEADERS += qgspostgresprovider.h
|
||||||
|
SOURCES += qgspostgresprovider.cpp \
|
||||||
|
..\..\src\qgsfeature.cpp \
|
||||||
|
..\..\src\qgsfield.cpp \
|
||||||
|
..\..\src\qgsrect.cpp \
|
||||||
|
..\..\src\qgsfeatureattribute.cpp \
|
||||||
|
..\..\src\qgspoint.cpp
|
@ -28,6 +28,11 @@
|
|||||||
#include "../../src/qgsrect.h"
|
#include "../../src/qgsrect.h"
|
||||||
|
|
||||||
#include "qgspostgresprovider.h"
|
#include "qgspostgresprovider.h"
|
||||||
|
#ifdef WIN32
|
||||||
|
#define QGISEXTERN extern "C" __declspec( dllexport )
|
||||||
|
#else
|
||||||
|
#define QGISEXTERN extern "C"
|
||||||
|
#endif
|
||||||
QgsPostgresProvider::QgsPostgresProvider(QString uri):dataSourceUri(uri)
|
QgsPostgresProvider::QgsPostgresProvider(QString uri):dataSourceUri(uri)
|
||||||
{
|
{
|
||||||
// assume this is a valid layer until we determine otherwise
|
// assume this is a valid layer until we determine otherwise
|
||||||
@ -723,25 +728,25 @@ QString QgsPostgresProvider::postgisVersion(PGconn *connection){
|
|||||||
* Class factory to return a pointer to a newly created
|
* Class factory to return a pointer to a newly created
|
||||||
* QgsPostgresProvider object
|
* QgsPostgresProvider object
|
||||||
*/
|
*/
|
||||||
extern "C" QgsPostgresProvider * classFactory(const char *uri)
|
QGISEXTERN QgsPostgresProvider * classFactory(const char *uri)
|
||||||
{
|
{
|
||||||
return new QgsPostgresProvider(uri);
|
return new QgsPostgresProvider(uri);
|
||||||
}
|
}
|
||||||
/** Required key function (used to map the plugin to a data store type)
|
/** Required key function (used to map the plugin to a data store type)
|
||||||
*/
|
*/
|
||||||
extern "C" QString providerKey(){
|
QGISEXTERN QString providerKey(){
|
||||||
return QString("postgres");
|
return QString("postgres");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Required description function
|
* Required description function
|
||||||
*/
|
*/
|
||||||
extern "C" QString description(){
|
QGISEXTERN QString description(){
|
||||||
return QString("PostgreSQL/PostGIS data provider");
|
return QString("PostgreSQL/PostGIS data provider");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Required isProvider function. Used to determine if this shared library
|
* Required isProvider function. Used to determine if this shared library
|
||||||
* is a data provider plugin
|
* is a data provider plugin
|
||||||
*/
|
*/
|
||||||
extern "C" bool isProvider(){
|
QGISEXTERN bool isProvider(){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user