diff --git a/CMakeLists.txt b/CMakeLists.txt index f52fe283c58..f370401c613 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,7 +366,11 @@ IF(WITH_CORE) FIND_PACKAGE(Qt5Xml REQUIRED) FIND_PACKAGE(Qt5Svg REQUIRED) FIND_PACKAGE(Qt5Concurrent REQUIRED) - FIND_PACKAGE(Qt5PrintSupport REQUIRED) + IF (NOT IOS) + FIND_PACKAGE(Qt5PrintSupport REQUIRED) + ELSE(NOT IOS) + ADD_DEFINITIONS(-DQT_NO_PRINTER) + ENDIF(NOT IOS) FIND_PACKAGE(Qt5Positioning) IF (WITH_QTWEBKIT) FIND_PACKAGE(Qt5WebKit REQUIRED) diff --git a/src/core/layout/qgslayoutexporter.h b/src/core/layout/qgslayoutexporter.h index 75c8467cd60..4048f42127b 100644 --- a/src/core/layout/qgslayoutexporter.h +++ b/src/core/layout/qgslayoutexporter.h @@ -16,7 +16,6 @@ #ifndef QGSLAYOUTEXPORTER_H #define QGSLAYOUTEXPORTER_H -#include #include "qgis_core.h" #include "qgsmargins.h" #include "qgslayoutrendercontext.h" @@ -28,6 +27,7 @@ #include #ifndef QT_NO_PRINTER +#include class QgsLayout; class QPainter; diff --git a/src/core/qgsmaprenderertask.cpp b/src/core/qgsmaprenderertask.cpp index 975624d49a3..60b979c8322 100644 --- a/src/core/qgsmaprenderertask.cpp +++ b/src/core/qgsmaprenderertask.cpp @@ -28,7 +28,9 @@ #include "qgsvectorlayer.h" #include #include +#ifndef QT_NO_PRINTER #include +#endif #include "gdal.h" #include "cpl_conv.h" diff --git a/src/core/qgsmaprenderertask.h b/src/core/qgsmaprenderertask.h index fcab4f73b64..ed0cafabd6c 100644 --- a/src/core/qgsmaprenderertask.h +++ b/src/core/qgsmaprenderertask.h @@ -29,8 +29,9 @@ #include "qgsabstractgeopdfexporter.h" #include +#ifndef QT_NO_PRINTER #include - +#endif class QgsMapRendererCustomPainterJob; class QgsAbstractGeoPdfExporter; diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp index a98f0171680..da563f85692 100644 --- a/src/core/qgsprojectfiletransform.cpp +++ b/src/core/qgsprojectfiletransform.cpp @@ -25,7 +25,9 @@ #include "qgsvectorlayer.h" #include #include +#ifndef QT_NO_PRINTER #include //to find out screen resolution +#endif #include #include "qgspathresolver.h" #include "qgsproject.h" diff --git a/src/core/raster/qgsrasterdrawer.cpp b/src/core/raster/qgsrasterdrawer.cpp index 4b86f1b20c4..7a2e34f51c6 100644 --- a/src/core/raster/qgsrasterdrawer.cpp +++ b/src/core/raster/qgsrasterdrawer.cpp @@ -25,7 +25,9 @@ #include "qgsrendercontext.h" #include #include +#ifndef QT_NO_PRINTER #include +#endif QgsRasterDrawer::QgsRasterDrawer( QgsRasterIterator *iterator ): mIterator( iterator ) {