added GDAL checks to configuration

git-svn-id: http://svn.osgeo.org/qgis/trunk@273 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2003-09-09 04:31:01 +00:00
parent 1ee978bdfe
commit 6439591f30

View File

@ -3,11 +3,11 @@
# Subdir relative project main directory: ./src # Subdir relative project main directory: ./src
# Target is an application: qgis # Target is an application: qgis
LIBS += -L$/usr/local/lib -lgdal.1.1 #LIBS += -L$/usr/local/lib -lgdal.1.1
SOURCES += main.cpp \ SOURCES += main.cpp \
qgisapp.cpp \ qgisapp.cpp \
qgisinterface.cpp \ qgisinterface.cpp \
qgsdatasource.cpp \
qgsmapcanvas.cpp \ qgsmapcanvas.cpp \
qgsmaplayer.cpp \ qgsmaplayer.cpp \
qgsrasterlayer.cpp \ qgsrasterlayer.cpp \
@ -30,7 +30,9 @@ SOURCES += main.cpp \
qgsprojectio.cpp \ qgsprojectio.cpp \
qgisiface.cpp \ qgisiface.cpp \
qgspluginmanager.cpp \ qgspluginmanager.cpp \
qgspluginitem.cpp qgspluginitem.cpp \
qgsfeature.cpp \
qgsfeatureattribute.cpp
HEADERS += qgisapp.h \ HEADERS += qgisapp.h \
qgisinterface.h \ qgisinterface.h \
qgisappbase.ui.h \ qgisappbase.ui.h \
@ -60,7 +62,9 @@ HEADERS += qgisapp.h \
qgisiface.h \ qgisiface.h \
qgspluginmanager.h \ qgspluginmanager.h \
qgspluginitem.h \ qgspluginitem.h \
qgsmaplayerinterface.h qgsmaplayerinterface.h \
qgsfeature.h \
qgsfeatureattribute.h
FORMS += qgisappbase.ui \ FORMS += qgisappbase.ui \
qgslegenditembase.ui \ qgslegenditembase.ui \
qgsabout.ui \ qgsabout.ui \
@ -76,6 +80,21 @@ CONFIG += debug \
thread thread
TARGET = qgis TARGET = qgis
#.............................
# GDAL/OGR configuration
#.............................
message(Configuring GDAL)
GDALCONFIG = $$system(which gdal-config)
isEmpty(GDALCONFIG) {
error("gdal-config not found in PATH. Check GDAL installation.")
}
# check to see if ogr enabled
OGR = $$system(gdal-config --ogr-enabled)
message("OGR enabled - $$OGR")
LIBS+= $$system(gdal-config --libs)
GDALINC = $$system(gdal-config --cflags)
INCLUDEPATH += $$GDALINC
# conditional tests for optional modules # conditional tests for optional modules
#............................. #.............................
@ -109,3 +128,4 @@ message ("PGSQL environment variable is not defined. PostgreSQL excluded from bu
message ("To build with PostgreSQL support set PGSQL to point to your Postgres installation") message ("To build with PostgreSQL support set PGSQL to point to your Postgres installation")
} }
} }
message ("Configuration complete, type make to build qgis")