Skip to content
Permalink
Browse files

optionally use external qwtpolar library

git-svn-id: http://svn.osgeo.org/qgis/trunk@15128 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 4, 2011
1 parent 098506d commit a3bbb9cf37f0a3f2fb90ca3700636f67040d56cd
Showing with 83 additions and 19 deletions.
  1. +5 −0 CMakeLists.txt
  2. +44 −0 cmake/FindQwtPolar.cmake
  3. +34 −19 src/app/CMakeLists.txt
@@ -63,6 +63,8 @@ IF (WITH_POSTGRESQL)
SET (POSTGRESQL_PREFIX "" CACHE PATH "Path to POSTGRESQL base directory")
ENDIF (WITH_POSTGRESQL)

SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal built of QWTPolar")

SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built")

IF (WITH_SPATIALITE)
@@ -141,6 +143,9 @@ FIND_PACKAGE(GSL) # Georeferencer
FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
FIND_PACKAGE(QWT REQUIRED)
IF (NOT WITH_INTERNAL_QWTPOLAR)
FIND_PACKAGE(QWTPOLAR REQUIRED)
ENDIF(NOT WITH_INTERNAL_QWTPOLAR)

IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
@@ -0,0 +1,44 @@
# Find QwtPolar
# ~~~~~~~~
# Copyright (c) 2011, Jürgen E. Fischer <jef at norbit.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Once run this will define:
#
# QWTPOLAR_FOUND = system has QWTPolar lib
# QWTPOLAR_LIBRARY = full path to the QWTPolar library
# QWTPOLAR_INCLUDE_DIR = where to find headers
#


#MESSAGE("Searching for QWTPolar")
FIND_PATH(QWTPOLAR_INCLUDE_DIR NAMES qwt_polar.h PATHS
/usr/include
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt4 qwt qwt5
)

FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
/usr/lib
/usr/local/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}/lib"
)

IF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
SET(QWTPOLAR_FOUND TRUE)
ENDIF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)

IF (QWTPOLAR_FOUND)
IF (NOT QWTPOLAR_FIND_QUIETLY)
MESSAGE(STATUS "Found QWTPolar: ${QWTPOLAR_LIBRARY}")
ENDIF (NOT QWTPOLAR_FIND_QUIETLY)
ELSE (QWTPOLAR_FOUND)
IF (QWTPOLAR_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find QWTPolar")
ENDIF (QWTPOLAR_FIND_REQUIRED)
ENDIF (QWTPOLAR_FOUND)
@@ -135,20 +135,7 @@ SET(QGIS_APP_SRCS

gps/qgsgpsinformationwidget.cpp
gps/qgsgpsmarker.cpp
gps/qwtpolar/qwt_polar_canvas.cpp
gps/qwtpolar/qwt_polar_curve.cpp
gps/qwtpolar/qwt_polar_fitter.cpp
gps/qwtpolar/qwt_polar_grid.cpp
gps/qwtpolar/qwt_polar_itemdict.cpp
gps/qwtpolar/qwt_polar_item.cpp
gps/qwtpolar/qwt_polar_layout.cpp
gps/qwtpolar/qwt_polar_magnifier.cpp
gps/qwtpolar/qwt_polar_marker.cpp
gps/qwtpolar/qwt_polar_panner.cpp
gps/qwtpolar/qwt_polar_plot.cpp
gps/qwtpolar/qwt_polar_point.cpp
gps/qwtpolar/qwt_polar_spectrogram.cpp
)
)


SET (QGIS_APP_MOC_HDRS
@@ -256,12 +243,39 @@ SET (QGIS_APP_MOC_HDRS
attributetable/qgsattributetabledelegate.h

gps/qgsgpsinformationwidget.h
gps/qwtpolar/qwt_polar_canvas.h
gps/qwtpolar/qwt_polar_magnifier.h
gps/qwtpolar/qwt_polar_panner.h
gps/qwtpolar/qwt_polar_plot.h
)

IF(WITH_INTERNAL_QWTPOLAR)
SET(QGIS_APP_SRCS
${QGIS_APP_SRCS}
gps/qwtpolar/qwt_polar_canvas.cpp
gps/qwtpolar/qwt_polar_curve.cpp
gps/qwtpolar/qwt_polar_fitter.cpp
gps/qwtpolar/qwt_polar_grid.cpp
gps/qwtpolar/qwt_polar_itemdict.cpp
gps/qwtpolar/qwt_polar_item.cpp
gps/qwtpolar/qwt_polar_layout.cpp
gps/qwtpolar/qwt_polar_magnifier.cpp
gps/qwtpolar/qwt_polar_marker.cpp
gps/qwtpolar/qwt_polar_panner.cpp
gps/qwtpolar/qwt_polar_plot.cpp
gps/qwtpolar/qwt_polar_point.cpp
gps/qwtpolar/qwt_polar_spectrogram.cpp
)

SET (QGIS_APP_MOC_HDRS
${QGIS_APP_MOC_HDRS}
gps/qwtpolar/qwt_polar_canvas.h
gps/qwtpolar/qwt_polar_magnifier.h
gps/qwtpolar/qwt_polar_panner.h
gps/qwtpolar/qwt_polar_plot.h
)

SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar)
SET(QWTPOLAR_LIBRARY "")
ENDIF(WITH_INTERNAL_QWTPOLAR)


IF (POSTGRES_FOUND)
IF(HAVE_PGCONFIG)
ADD_DEFINITIONS(-DHAVE_PGCONFIG=1)
@@ -339,7 +353,6 @@ INCLUDE_DIRECTORIES(
../plugins
../python
gps
gps/qwtpolar
)

IF (HAVE_SPATIALITE)
@@ -357,6 +370,7 @@ INCLUDE_DIRECTORIES(
${PROJ_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${QWTPOLAR_INCLUDE_DIR}
)

IF (POSTGRES_FOUND)
@@ -382,6 +396,7 @@ TARGET_LINK_LIBRARIES(${QGIS_APP_NAME}
${QT_QTUITOOLS_LIBRARY}
#should only be needed for win
${QT_QTMAIN_LIBRARY}
${QWTPOLAR_LIBRARY}
qgis_core
qgis_gui
qgis_analysis

0 comments on commit a3bbb9c

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