Skip to content
Permalink
Browse files
internal sqlite3 was replaced with spatialite
git-svn-id: http://svn.osgeo.org/qgis/trunk@10480 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 5, 2009
1 parent ed29f59 commit ae7aff694e2d0f3e31e0b93f7b250fdea2da501b
Showing with 104 additions and 97,129 deletions.
  1. +8 −13 CMakeLists.txt
  2. +10 −5 src/app/CMakeLists.txt
  3. +5 −14 src/core/CMakeLists.txt
  4. +0 −91,860 src/core/sqlite3/sqlite3.c
  5. +0 −4,815 src/core/sqlite3/sqlite3.h
  6. +0 −351 src/core/sqlite3/sqlite3ext.h
  7. +8 −5 src/gui/CMakeLists.txt
  8. +73 −66 src/helpviewer/CMakeLists.txt
@@ -73,9 +73,6 @@ IF (WITH_BINDINGS)
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
ENDIF (WITH_BINDINGS)

# Optionally allow embedding sqlite3 into the binary (sqlite amalgamation) as
# recommended by sqlite developer
SET (WITH_INTERNAL_SQLITE3 FALSE CACHE BOOL "Compile sqlite3 support directly into the binary")
# Compile flag. Make it posible to turn it off.
SET (PEDANTIC FALSE CACHE BOOL "Determines if we should compile in pedantic mode.")

@@ -111,27 +108,26 @@ ENDIF (NOT BISON_EXECUTABLE)

# required
FIND_PACKAGE(Proj)
FIND_PACKAGE(Expat) # GPS importer plugin
FIND_PACKAGE(GSL) # Georeferencer
FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)

#optional since we can use internal sqlite
IF (NOT WITH_INTERNAL_SQLITE3)
IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
MESSAGE (SEND_ERROR "sqlite3 dependency was not found (try compiling with sqlite3 internal)!")
MESSAGE (SEND_ERROR "sqlite3 dependency was not found (try compiling with internal spatialite)!")
ENDIF (NOT SQLITE3_FOUND)
ENDIF (NOT WITH_INTERNAL_SQLITE3)

FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
ENDIF (NOT WITH_INTERNAL_SPATIALITE)

# optional
IF (WITH_POSTGRESQL)
FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
ENDIF (WITH_POSTGRESQL)
FIND_PACKAGE(Expat) # GPS importer plugin
FIND_PACKAGE(GSL) # Georeferencer
IF (WITH_GRASS)
FIND_PACKAGE(GRASS) # GRASS plugin
ENDIF (WITH_GRASS)

IF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(SPATIALITE)
ENDIF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
@@ -143,7 +139,6 @@ IF (WITH_BINDINGS)
INCLUDE (Python) # file cmake/Python.cmake
ENDIF (WITH_BINDINGS)


IF (NOT PROJ_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)
MESSAGE (SEND_ERROR "Some dependencies were not found!")
ENDIF (NOT PROJ_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)
@@ -218,8 +218,6 @@ IF (WIN32)
ENDIF (MSVC)
ENDIF (WIN32)



INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} composer legend attributetable
${CMAKE_CURRENT_BINARY_DIR}
@@ -230,11 +228,16 @@ INCLUDE_DIRECTORIES(
../plugins
../python
${PROJ_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ENDIF (WITH_INTERNAL_SPATIALITE)

IF (POSTGRES_FOUND)
INCLUDE_DIRECTORIES(${POSTGRES_INCLUDE_DIR})
ENDIF (POSTGRES_FOUND)
@@ -268,9 +271,11 @@ TARGET_LINK_LIBRARIES(qgis
qgis_core
qgis_gui
)
IF(NOT WITH_INTERNAL_SQLITE AND NOT WITH_INTERNAL_SPATIALITE)

IF(NOT WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis ${SQLITE_LIBRARY})
ENDIF(NOT WITH_INTERNAL_SQLITE AND NOT WITH_INTERNAL_SPATIALITE)
ENDIF(NOT WITH_INTERNAL_SPATIALITE)

IF (${QTVERSION} STRLESS "4.3.0")
TARGET_LINK_LIBRARIES(qgis ${QT_QT3SUPPORT_LIBRARY} )
ENDIF (${QTVERSION} STRLESS "4.3.0")
@@ -89,12 +89,6 @@ SET(QGIS_CORE_SRCS

spatialindex/qgsspatialindex.cpp
)
IF (WITH_INTERNAL_SQLITE3)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
sqlite3/sqlite3.c
)
ENDIF (WITH_INTERNAL_SQLITE3)

IF (WITH_INTERNAL_SPATIALITE)
IF (WIN32)
@@ -202,11 +196,10 @@ INCLUDE_DIRECTORIES(
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
)
IF (WITH_INTERNAL_SQLITE3)
INCLUDE_DIRECTORIES(sqlite3)
ELSE (WITH_INTERNAL_SQLITE3)

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

IF (WIN32)
IF (MSVC)
@@ -277,11 +270,9 @@ IF (WITH_INTERNAL_SPATIALITE)
IF (WIN32)
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
ENDIF (WIN32)
ENDIF (WITH_INTERNAL_SPATIALITE)

IF (NOT WITH_INTERNAL_SQLITE3)
ELSE (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
ENDIF (NOT WITH_INTERNAL_SQLITE3)
ENDIF (WITH_INTERNAL_SPATIALITE)

INSTALL(TARGETS qgis_core
RUNTIME DESTINATION ${QGIS_BIN_DIR}

0 comments on commit ae7aff6

Please sign in to comment.