Skip to content
Permalink
Browse files

apply revised #6613

  • Loading branch information
jef-n committed Nov 3, 2012
1 parent 35646bb commit dcef08382677bbd13c525eddc3db16637f07ed11
Showing with 91 additions and 75 deletions.
  1. +9 −1 CMakeLists.txt
  2. +43 −44 python/CMakeLists.txt
  3. +3 −2 src/app/CMakeLists.txt
  4. +33 −25 src/core/CMakeLists.txt
  5. +3 −3 src/plugins/gps_importer/CMakeLists.txt
@@ -55,6 +55,8 @@ ENDIF (WITH_POSTGRESQL)

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")
@@ -157,12 +159,18 @@ FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(Expat)
FIND_PACKAGE(Spatialindex REQUIRED)

FIND_PACKAGE(Qwt REQUIRED)

IF (NOT WITH_INTERNAL_QWTPOLAR)
FIND_PACKAGE(QwtPolar REQUIRED)
ENDIF(NOT WITH_INTERNAL_QWTPOLAR)

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QEXTSERIALPORT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/gps/qextserialport)
ELSE (WITH_INTERNAL_QEXTSERIALPORT)
FIND_PACKAGE(Qextserialport REQUIRED)
ENDIF(WITH_INTERNAL_QEXTSERIALPORT)

IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
@@ -20,32 +20,32 @@ SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})

INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_PATH}
${SIP_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR}
${QT_QTSVG_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QWT_INCLUDE_DIR}

../src/core
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/gps
../src/core/gps/qextserialport
../src/core/raster
../src/core/renderer
../src/core/symbology
../src/core/symbology-ng

../src/gui/raster
../src/gui/attributetable

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
${PYTHON_INCLUDE_PATH}
${SIP_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${QT_QTNETWORK_INCLUDE_DIR}
${QT_QTSVG_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${QWT_INCLUDE_DIR}
${QEXTSERIALPORT_INCLUDE_DIR}

../src/core
../src/core/pal
../src/core/composer
../src/core/diagram
../src/core/gps
../src/core/raster
../src/core/renderer
../src/core/symbology
../src/core/symbology-ng

../src/gui/raster
../src/gui/attributetable

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)

IF(NOT WITH_TOUCH)
@@ -80,11 +80,11 @@ ADD_SIP_PYTHON_MODULE(qgis.core core/core.sip qgis_core)

# additional gui includes
INCLUDE_DIRECTORIES(
../src/gui
../src/gui/symbology-ng
../src/plugins
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
../src/gui
../src/gui/symbology-ng
../src/plugins
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)

# gui module
@@ -95,22 +95,22 @@ ADD_SIP_PYTHON_MODULE(qgis.gui gui/gui.sip qgis_core qgis_gui)

# additional analysis includes
INCLUDE_DIRECTORIES(
../src/analysis/vector
../src/analysis/raster
../src/analysis/network
../src/analysis/interpolation
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/raster
${CMAKE_BINARY_DIR}/src/analysis/interpolation
../src/analysis/vector
../src/analysis/raster
../src/analysis/network
../src/analysis/interpolation
${CMAKE_BINARY_DIR}/src/analysis/vector
${CMAKE_BINARY_DIR}/src/analysis/network
${CMAKE_BINARY_DIR}/src/analysis/raster
${CMAKE_BINARY_DIR}/src/analysis/interpolation
)

# analysis module
FILE(GLOB sip_files_analysis
analysis/*.sip
analysis/raster/*.sip
analysis/vector/*.sip
analysis/interpolation/*.sip
analysis/*.sip
analysis/raster/*.sip
analysis/vector/*.sip
analysis/interpolation/*.sip
)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis})
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api)
@@ -170,4 +170,3 @@ IF(WITH_PY_COMPILE)
DEPENDS pyutils
)
ENDIF(WITH_PY_COMPILE)

@@ -409,9 +409,10 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../ui
${QWT_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
${QEXTSERIALPORT_INCLUDE_DIR}
../analysis/raster
../core
../core/gps ../core/gps/qextserialport
../core/gps
../core/composer ../core/raster ../core/renderer ../core/symbology ../core/symbology-ng
../gui ../gui/symbology-ng ../gui/attributetable ../gui/raster
../plugins
@@ -420,7 +421,7 @@ INCLUDE_DIRECTORIES(
)

IF (ANDROID)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
ENDIF (ANDROID)

IF (HAVE_SPATIALITE)
@@ -5,9 +5,6 @@

SET(QGIS_CORE_SRCS

gps/qextserialport/qextserialport.cpp
gps/qextserialport/qextserialenumerator.cpp

gps/qgsgpsconnection.cpp
gps/qgsgpsconnectionregistry.cpp
gps/qgsnmeaconnection.cpp
@@ -212,23 +209,29 @@ SET(QGIS_CORE_SRCS
qgsscaleutils.cpp
)

IF(WIN32)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
gps/qextserialport/win_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_WIN_)
ELSE(WIN32)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
gps/qextserialport/posix_qextserialport.cpp
IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/qextserialport.cpp
gps/qextserialport/qextserialenumerator.cpp
)
ADD_DEFINITIONS(-D_TTY_POSIX_)
ENDIF(WIN32)

IF(WIN32)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/win_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_WIN_)
ELSE(WIN32)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qextserialport/posix_qextserialport.cpp
)
ADD_DEFINITIONS(-D_TTY_POSIX_)
ENDIF(WIN32)
ELSE (WITH_INTERNAL_QEXTSERIALPORT)
INCLUDE_DIRECTORIES(${QEXTSERIALPORT_INCLUDE_DIR})
ENDIF (WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
gps/qgsqtlocationconnection.cpp
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
@@ -250,8 +253,7 @@ IF (WITH_INTERNAL_SPATIALITE)
ADD_DEFINITIONS(-D_LARGE_FILE=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1)
ADD_DEFINITIONS(-DSQLITE_ENABLE_RTREE=1)

SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
spatialite/sqlite3.c
spatialite/spatialite.c
)
@@ -316,16 +318,19 @@ SET(QGIS_CORE_MOC_HDRS
gps/qgsgpsdetector.h
gps/qgsnmeaconnection.h
gps/qgsgpsdconnection.h
gps/qextserialport/qextserialport.h
gps/qextserialport/qextserialenumerator.h

symbology-ng/qgscptcityarchive.h
)

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
gps/qextserialport/qextserialport.h
gps/qextserialport/qextserialenumerator.h
)
ENDIF (WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_MOC_HDRS
${QGIS_CORE_MOC_HDRS}
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
gps/qgsqtlocationconnection.h
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
@@ -474,8 +479,7 @@ SET(QGIS_CORE_HDRS
)

IF (QT_MOBILITY_LOCATION_FOUND)
SET(QGIS_CORE_HDRS
${QGIS_CORE_HDRS}
SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
gps/qgsqtlocationconnection.h
)
ENDIF (QT_MOBILITY_LOCATION_FOUND)
@@ -558,6 +562,10 @@ IF(APPLE)
TARGET_LINK_LIBRARIES(qgis_core "-framework CoreFoundation -framework IOKit")
ENDIF(APPLE)

IF (NOT WITH_INTERNAL_QEXTSERIALPORT)
TARGET_LINK_LIBRARIES(qgis_core ${QEXTSERIALPORT_LIBRARY})
ENDIF (NOT WITH_INTERNAL_QEXTSERIALPORT)

IF (QT_MOBILITY_LOCATION_FOUND)
TARGET_LINK_LIBRARIES(qgis_core ${QT_MOBILITY_LOCATION_LIBRARY})
ENDIF (QT_MOBILITY_LOCATION_FOUND)
@@ -37,8 +37,9 @@ ADD_LIBRARY (gpsimporterplugin MODULE ${GPS_SRCS} ${GPS_MOC_SRCS} ${GPS_RCC_SRCS
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
../../core ../../core/gps ../../core/gps/qextserialport

${QEXTSERIALPORT_INCLUDE_DIR}
../../core
../../core/gps
../../gui
..
${EXPAT_INCLUDE_DIR}
@@ -49,7 +50,6 @@ TARGET_LINK_LIBRARIES(gpsimporterplugin
qgis_gui
)


########################################################
# Install

0 comments on commit dcef083

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