Skip to content
Permalink
Browse files

spatialite isn't optional anymore (offlineediting, osm):

- remove configuration options
  • Loading branch information
jef-n committed Apr 7, 2013
1 parent eeebf5b commit 2db0f62de8a023d5dfd7dbff25536b981d544ae1
@@ -57,19 +57,16 @@ SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal build of QwtPolar")

SET (WITH_INTERNAL_QEXTSERIALPORT TRUE CACHE BOOL "Use internal build of Qextserialport")

SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built")
IF (WITH_SPATIALITE)
SET (WITH_INTERNAL_SPATIALITE FALSE CACHE BOOL "Determines whether SPATIALITE support should be built internally")
SET (WITH_PYSPATIALITE FALSE CACHE BOOL "Determines whether PYSPATIALITE should be built")
SET (WITH_QSPATIALITE FALSE CACHE BOOL "Determines whether QSPATIALITE sql driver should be built")
IF(WITH_INTERNAL_SPATIALITE)
SET(SPATIALITE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/spatialite/headers)
SET(HAVE_SPATIALITE TRUE)
IF(WIN32 OR APPLE OR CYGWIN)
FIND_PACKAGE(Iconv REQUIRED)
ENDIF(WIN32 OR APPLE OR CYGWIN)
ENDIF (WITH_INTERNAL_SPATIALITE)
ENDIF (WITH_SPATIALITE)
SET (WITH_INTERNAL_SPATIALITE FALSE CACHE BOOL "Determines whether SPATIALITE support should be built internally")
SET (WITH_PYSPATIALITE FALSE CACHE BOOL "Determines whether PYSPATIALITE should be built")
SET (WITH_QSPATIALITE FALSE CACHE BOOL "Determines whether QSPATIALITE sql driver should be built")
IF(WITH_INTERNAL_SPATIALITE)
SET(SPATIALITE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/spatialite/headers)
SET(HAVE_SPATIALITE TRUE)
IF(WIN32 OR APPLE OR CYGWIN)
FIND_PACKAGE(Iconv REQUIRED)
ENDIF(WIN32 OR APPLE OR CYGWIN)
ENDIF (WITH_INTERNAL_SPATIALITE)

SET (WITH_ORACLE FALSE CACHE BOOL "Determines whether Oracle support should be built")
IF(WITH_ORACLE)
@@ -198,9 +195,9 @@ IF (WITH_POSTGRESQL)
FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
ENDIF (WITH_POSTGRESQL)

IF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(SPATIALITE)
ENDIF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
ENDIF (NOT WITH_INTERNAL_SPATIALITE)

IF (NOT PROJ_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)
MESSAGE (SEND_ERROR "Some dependencies were not found!")
@@ -46,7 +46,6 @@ CMAKE_OPTS := \
-D CMAKE_INSTALL_PREFIX=/usr \
-D BINDINGS_GLOBAL_INSTALL=TRUE \
-D PEDANTIC=TRUE \
-D WITH_SPATIALITE=TRUE \
-D WITH_QSPATIALITE=TRUE \
-D WITH_MAPSERVER=TRUE \
-D QGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
@@ -107,7 +107,6 @@ cmake -G "Visual Studio 9 2008" ^
-D BUILDNAME="OSGeo4W-Nightly-VC9" ^
-D SITE="qgis.org" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D WITH_ASTYLE=TRUE ^
@@ -104,7 +104,6 @@ set GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION%

cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_QSPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D WITH_GLOBE=TRUE ^
@@ -37,30 +37,26 @@ SET(QGIS_ANALYSIS_SRCS
vector/qgsgeometryanalyzer.cpp
vector/qgszonalstatistics.cpp
vector/qgsoverlayanalyzer.cpp
)

IF(HAVE_SPATIALITE)
SET(QGIS_ANALYSIS_SRCS ${QGIS_ANALYSIS_SRCS}
openstreetmap/qgsosmbase.cpp
openstreetmap/qgsosmdatabase.cpp
openstreetmap/qgsosmdownload.cpp
openstreetmap/qgsosmimport.cpp
)
openstreetmap/qgsosmbase.cpp
openstreetmap/qgsosmdatabase.cpp
openstreetmap/qgsosmdownload.cpp
openstreetmap/qgsosmimport.cpp
)

SET(QGIS_ANALYSIS_MOC_HDRS
openstreetmap/qgsosmdownload.h
openstreetmap/qgsosmimport.h
)
SET(QGIS_ANALYSIS_MOC_HDRS
openstreetmap/qgsosmdownload.h
openstreetmap/qgsosmimport.h
)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(../core/spatialite/headers)
INCLUDE_DIRECTORIES(../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SPATIALITE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ADD_DEFINITIONS(-DEXTERNAL_SPATIALITE)
ENDIF (WITH_INTERNAL_SPATIALITE)
ENDIF(HAVE_SPATIALITE)
IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(../core/spatialite/headers)
INCLUDE_DIRECTORIES(../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SPATIALITE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ADD_DEFINITIONS(-DEXTERNAL_SPATIALITE)
ENDIF (WITH_INTERNAL_SPATIALITE)

INCLUDE_DIRECTORIES(BEFORE raster)
ADD_FLEX_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalclexer.ll)
@@ -107,14 +103,12 @@ SET(QGIS_ANALYSIS_HDRS
interpolation/qgstininterpolator.h
)

IF(HAVE_SPATIALITE)
SET(QGIS_ANALYSIS_HDRS ${QGIS_ANALYSIS_HDRS}
openstreetmap/qgsosmbase.h
openstreetmap/qgsosmdatabase.h
openstreetmap/qgsosmdownload.h
openstreetmap/qgsosmimport.h
)
ENDIF(HAVE_SPATIALITE)
SET(QGIS_ANALYSIS_HDRS ${QGIS_ANALYSIS_HDRS}
openstreetmap/qgsosmbase.h
openstreetmap/qgsosmdatabase.h
openstreetmap/qgsosmdownload.h
openstreetmap/qgsosmimport.h
)

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -156,6 +156,8 @@ SET(QGIS_APP_SRCS
openstreetmap/qgsosmdownloaddialog.cpp
openstreetmap/qgsosmimportdialog.cpp
openstreetmap/qgsosmexportdialog.cpp

qgsnewspatialitelayerdialog.cpp
)

SET (QGIS_APP_MOC_HDRS
@@ -289,6 +291,8 @@ SET (QGIS_APP_MOC_HDRS
openstreetmap/qgsosmdownloaddialog.h
openstreetmap/qgsosmimportdialog.h
openstreetmap/qgsosmexportdialog.h

qgsnewspatialitelayerdialog.h
)

IF(WITH_INTERNAL_QWTPOLAR)
@@ -365,16 +369,6 @@ IF (POSTGRES_FOUND)
ENDIF(HAVE_PGCONFIG)
ENDIF (POSTGRES_FOUND)

IF (HAVE_SPATIALITE)
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
qgsnewspatialitelayerdialog.cpp
)
SET (QGIS_APP_MOC_HDRS ${QGIS_APP_MOC_HDRS}
qgsnewspatialitelayerdialog.h
)
ENDIF(HAVE_SPATIALITE)


SET(IMAGE_RCCS ../../images/images.qrc)

QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
@@ -435,16 +429,14 @@ IF (ANDROID)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
ENDIF (ANDROID)

IF (HAVE_SPATIALITE)
IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(../core/spatialite/headers)
INCLUDE_DIRECTORIES(../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SPATIALITE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ADD_DEFINITIONS(-DEXTERNAL_SPATIALITE)
ENDIF (WITH_INTERNAL_SPATIALITE)
ENDIF (HAVE_SPATIALITE)
IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(../core/spatialite/headers)
INCLUDE_DIRECTORIES(../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SPATIALITE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ADD_DEFINITIONS(-DEXTERNAL_SPATIALITE)
ENDIF (WITH_INTERNAL_SPATIALITE)

INCLUDE_DIRECTORIES(
${PROJ_INCLUDE_DIR}
@@ -273,13 +273,11 @@

#include <sqlite3.h>

#ifdef HAVE_SPATIALITE
extern "C"
{
#include <spatialite.h>
}
#include "qgsnewspatialitelayerdialog.h"
#endif

#include "qgspythonutils.h"

@@ -1093,13 +1091,6 @@ void QgisApp::createActions()
connect( mActionRotateLabel, SIGNAL( triggered() ), this, SLOT( rotateLabel() ) );
connect( mActionChangeLabelProperties, SIGNAL( triggered() ), this, SLOT( changeLabelProperties() ) );

#ifndef HAVE_SPATIALITE
delete mActionNewSpatialiteLayer;
mActionNewSpatialiteLayer = 0;
delete mActionAddSpatiaLiteLayer;
mActionAddSpatiaLiteLayer = 0;
#endif

#ifndef HAVE_POSTGRESQL
delete mActionAddPgLayer;
mActionAddPgLayer = 0;
@@ -1659,10 +1650,8 @@ void QgisApp::setTheme( QString theThemeName )
#ifdef HAVE_POSTGRESQL
mActionAddPgLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddLayer.png" ) );
#endif
#ifdef HAVE_SPATIALITE
mActionNewSpatialiteLayer->setIcon( QgsApplication::getThemeIcon( "/mActionNewVectorLayer.png" ) );
mActionAddSpatiaLiteLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddSpatiaLiteLayer.png" ) );
#endif
#ifdef HAVE_MSSQL
mActionAddMssqlLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddMssqlLayer.png" ) );
#endif
@@ -2415,11 +2404,7 @@ void QgisApp::about()
versionString += "</tr><tr>";

versionString += "<td>" + tr( "SpatiaLite Version" ) + "</td><td>";
#ifdef HAVE_SPATIALITE
versionString += spatialite_version();
#else
versionString += tr( "No support." );
#endif
versionString += "</td>";

versionString += "<td>" + tr( "QWT Version" ) + "</td><td>" + QWT_VERSION_STR + "</td>";
@@ -2961,7 +2946,6 @@ void QgisApp::addDatabaseLayers( QStringList const & layerPathList, QString cons

void QgisApp::addSpatiaLiteLayer()
{
#ifdef HAVE_SPATIALITE
if ( mMapCanvas && mMapCanvas->isDrawing() )
{
return;
@@ -2978,7 +2962,6 @@ void QgisApp::addSpatiaLiteLayer()
this , SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
dbs->exec();
delete dbs;
#endif
} // QgisApp::addSpatiaLiteLayer()

void QgisApp::addMssqlLayer()
@@ -3438,7 +3421,6 @@ void QgisApp::newVectorLayer()
}
}

#ifdef HAVE_SPATIALITE
void QgisApp::newSpatialiteLayer()
{
if ( mMapCanvas && mMapCanvas->isDrawing() )
@@ -3448,7 +3430,6 @@ void QgisApp::newSpatialiteLayer()
QgsNewSpatialiteLayerDialog spatialiteDialog( this );
spatialiteDialog.exec();
}
#endif

void QgisApp::showRasterCalculator()
{
@@ -621,10 +621,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
//#endif
//! Add a list of database layers to the map
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
//#ifdef HAVE_SPATIALITE
//! Add a SpatiaLite layer to the map
void addSpatiaLiteLayer();
//#endif
//#ifdef HAVE_MSSQL
//! Add a MSSQL layer to the map
void addMssqlLayer();
@@ -781,10 +779,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow

//! Create a new empty vector layer
void newVectorLayer();
#ifdef HAVE_SPATIALITE
//! Create a new empty spatialite layer
void newSpatialiteLayer();
#endif
//! Print the current map view frame
void newPrintComposer();
void showComposerManager();
@@ -556,6 +556,7 @@ INCLUDE_DIRECTORIES(

IF (NOT WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SPATIALITE_INCLUDE_DIR})
ENDIF (NOT WITH_INTERNAL_SPATIALITE)

IF (WIN32)
@@ -17,10 +17,7 @@ ADD_SUBDIRECTORY(zonal_statistics)
ADD_SUBDIRECTORY(georeferencer)
ADD_SUBDIRECTORY(gps_importer)
ADD_SUBDIRECTORY(topology)

IF (WITH_SPATIALITE)
ADD_SUBDIRECTORY(offline_editing)
ENDIF (WITH_SPATIALITE)
ADD_SUBDIRECTORY(offline_editing)

IF (POSTGRES_FOUND)
ADD_SUBDIRECTORY(spit)

0 comments on commit 2db0f62

Please sign in to comment.
You can’t perform that action at this time.