Skip to content
Permalink
Browse files

Add qgis_core.h to with CORE_EXPORT macro

This removes complexity from the compiler flags because defines
happen in a file.
  • Loading branch information
m-kuhn committed Jan 4, 2017
1 parent ab77fee commit 0302719cf0cb1d5b6e52dc4e1985797dda6917be
Showing with 336 additions and 100 deletions.
  1. +1 −1 CMakeLists.txt
  2. +1 −0 python/CMakeLists.txt
  3. +2 −1 python/sip_helpers/CMakeLists.txt
  4. +1 −0 src/analysis/CMakeLists.txt
  5. +1 −0 src/app/CMakeLists.txt
  6. +1 −0 src/app/dwg/libdxfrw/CMakeLists.txt
  7. +1 −0 src/auth/basic/CMakeLists.txt
  8. +1 −0 src/auth/identcert/CMakeLists.txt
  9. +1 −0 src/auth/pkipaths/CMakeLists.txt
  10. +1 −0 src/auth/pkipkcs12/CMakeLists.txt
  11. +1 −0 src/browser/CMakeLists.txt
  12. +9 −4 src/core/CMakeLists.txt
  13. +2 −0 src/core/auth/qgsauthcertutils.h
  14. +2 −0 src/core/auth/qgsauthcrypto.h
  15. +2 −0 src/core/auth/qgsauthmethod.h
  16. +2 −0 src/core/auth/qgsauthmethodmetadata.h
  17. +2 −0 src/core/auth/qgsauthmethodregistry.h
  18. +3 −0 src/core/composer/qgsaddremoveitemcommand.h
  19. +2 −0 src/core/composer/qgsaddremovemultiframecommand.h
  20. +2 −0 src/core/composer/qgscomposerattributetablemodelv2.h
  21. +2 −0 src/core/composer/qgscomposereffect.h
  22. +2 −0 src/core/composer/qgscomposeritemcommand.h
  23. +2 −0 src/core/composer/qgscomposermousehandles.h
  24. +2 −0 src/core/composer/qgscomposermultiframecommand.h
  25. +2 −0 src/core/composer/qgscomposertablecolumn.h
  26. +2 −0 src/core/composer/qgsscalebarstyle.h
  27. +2 −0 src/core/dxf/qgsdxfpaintdevice.h
  28. +2 −0 src/core/effects/qgsimageoperation.h
  29. +2 −0 src/core/geometry/qgswkbtypes.h
  30. +2 −0 src/core/gps/qgsgpsconnection.h
  31. +2 −0 src/core/gps/qgsgpsconnectionregistry.h
  32. +1 −0 src/core/gps/qgsgpsdetector.h
  33. +2 −0 src/core/layertree/qgslayertreeregistrybridge.h
  34. +1 −0 src/core/layertree/qgslayertreeutils.h
  35. +2 −0 src/core/pal/pointset.h
  36. +2 −1 src/core/qgis.h
  37. +2 −0 src/core/qgsattributetableconfig.h
  38. +1 −0 src/core/qgsbearingutils.h
  39. +2 −0 src/core/qgscolorscheme.h
  40. +2 −0 src/core/qgscontexthelp.h
  41. +2 −0 src/core/qgscoordinateutils.h
  42. +2 −0 src/core/qgscredentials.h
  43. +2 −0 src/core/qgsdartmeasurement.h
  44. +2 −0 src/core/qgsdataitemprovider.h
  45. +2 −0 src/core/qgsdataitemproviderregistry.h
  46. +2 −0 src/core/qgsdbfilterproxymodel.h
  47. +2 −0 src/core/qgserror.h
  48. +2 −0 src/core/qgsexception.h
  49. +2 −0 src/core/qgsfeaturefilterprovider.h
  50. +2 −0 src/core/qgsfeedback.h
  51. +1 −0 src/core/qgsfield.h
  52. +2 −0 src/core/qgsfieldconstraints.h
  53. +2 −0 src/core/qgsfieldformatter.h
  54. +2 −0 src/core/qgsfieldformatterregistry.h
  55. +2 −0 src/core/qgsfontutils.h
  56. +2 −0 src/core/qgsgeometrysimplifier.h
  57. +2 −0 src/core/qgshistogram.h
  58. +3 −0 src/core/qgsinterval.h
  59. +2 −0 src/core/qgslegendstyle.h
  60. +2 −0 src/core/qgslocalec.h
  61. +3 −0 src/core/qgslogger.h
  62. +2 −0 src/core/qgsmaplayerlegend.h
  63. +2 −0 src/core/qgsmaplayermodel.h
  64. +2 −0 src/core/qgsmaplayerproxymodel.h
  65. +2 −0 src/core/qgsmaplayerrenderer.h
  66. +2 −0 src/core/qgsmaplayerstylemanager.h
  67. +2 −0 src/core/qgsmessagelog.h
  68. +2 −0 src/core/qgsmessageoutput.h
  69. +2 −0 src/core/qgsmimedatautils.h
  70. +2 −0 src/core/qgsnetworkaccessmanager.h
  71. +2 −0 src/core/qgsnetworkcontentfetcher.h
  72. +2 −0 src/core/qgsnetworkreplyparser.h
  73. +1 −0 src/core/qgsobjectcustomproperties.h
  74. +2 −0 src/core/qgsoptional.h
  75. +2 −0 src/core/qgsoptionalexpression.h
  76. +2 −0 src/core/qgspaintenginehack.h
  77. +2 −0 src/core/qgspainting.h
  78. +2 −0 src/core/qgspluginlayerregistry.h
  79. +2 −0 src/core/qgsprojectbadlayerhandler.h
  80. +1 −0 src/core/qgsprojectfiletransform.h
  81. +2 −0 src/core/qgsprojectproperty.h
  82. +1 −0 src/core/qgsprojectversion.h
  83. +2 −0 src/core/qgsprovidermetadata.h
  84. +2 −0 src/core/qgsproviderregistry.h
  85. +2 −0 src/core/qgspythonrunner.h
  86. +2 −0 src/core/qgsrunprocess.h
  87. +2 −0 src/core/qgsruntimeprofiler.h
  88. +2 −0 src/core/qgsscaleutils.h
  89. +2 −0 src/core/qgssimplifymethod.h
  90. +2 −0 src/core/qgsslconnect.h
  91. +2 −0 src/core/qgssqlstatement.h
  92. +2 −0 src/core/qgsstatisticalsummary.h
  93. +2 −0 src/core/qgsstringstatisticalsummary.h
  94. +2 −0 src/core/qgstaskmanager.h
  95. +2 −0 src/core/qgstransaction.h
  96. +2 −0 src/core/qgsvectorlayerlabeling.h
  97. +2 −0 src/core/qgsvirtuallayerdefinitionutils.h
  98. +2 −0 src/core/qgswebview.h
  99. +2 −0 src/core/raster/qgsbilinearrasterresampler.h
  100. +2 −0 src/core/raster/qgscubicrasterresampler.h
  101. +2 −0 src/core/raster/qgsrasterminmaxorigin.h
  102. +2 −0 src/core/symbology-ng/qgslegendsymbolitem.h
  103. +2 −0 src/core/symbology-ng/qgssvgcache.h
  104. +1 −0 src/crssync/CMakeLists.txt
  105. +1 −0 src/customwidgets/CMakeLists.txt
  106. +1 −0 src/gui/CMakeLists.txt
  107. +1 −0 src/helpviewer/CMakeLists.txt
  108. +5 −4 src/plugins/compass/CMakeLists.txt
  109. +8 −7 src/plugins/coordinate_capture/CMakeLists.txt
  110. +14 −13 src/plugins/evis/CMakeLists.txt
  111. +9 −8 src/plugins/geometry_checker/CMakeLists.txt
  112. +13 −12 src/plugins/georeferencer/CMakeLists.txt
  113. +12 −11 src/plugins/globe/CMakeLists.txt
  114. +11 −10 src/plugins/gps_importer/CMakeLists.txt
  115. +1 −0 src/plugins/grass/CMakeLists.txt
  116. +19 −18 src/plugins/offline_editing/CMakeLists.txt
  117. +8 −7 src/plugins/spatialquery/CMakeLists.txt
  118. +1 −0 src/plugins/topology/CMakeLists.txt
  119. +1 −0 src/providers/arcgisrest/CMakeLists.txt
  120. +1 −0 src/providers/db2/CMakeLists.txt
  121. +1 −0 src/providers/delimitedtext/CMakeLists.txt
  122. +1 −0 src/providers/gdal/CMakeLists.txt
  123. +1 −0 src/providers/gpx/CMakeLists.txt
  124. +1 −0 src/providers/grass/CMakeLists.txt
  125. +1 −0 src/providers/memory/CMakeLists.txt
  126. +1 −0 src/providers/mssql/CMakeLists.txt
  127. +1 −0 src/providers/ogr/CMakeLists.txt
  128. +1 −0 src/providers/oracle/CMakeLists.txt
  129. +1 −0 src/providers/ows/CMakeLists.txt
  130. +1 −0 src/providers/postgres/CMakeLists.txt
  131. +1 −0 src/providers/spatialite/CMakeLists.txt
  132. +1 −0 src/providers/virtual/CMakeLists.txt
  133. +1 −0 src/providers/wcs/CMakeLists.txt
  134. +1 −0 src/providers/wfs/CMakeLists.txt
  135. +1 −0 src/providers/wms/CMakeLists.txt
  136. +6 −3 src/python/CMakeLists.txt
  137. +1 −0 src/server/CMakeLists.txt
  138. +1 −0 tests/bench/CMakeLists.txt
  139. +2 −0 tests/qt_modeltest/modeltest.h
  140. +1 −0 tests/src/analysis/CMakeLists.txt
  141. +1 −0 tests/src/app/CMakeLists.txt
  142. +1 −0 tests/src/core/CMakeLists.txt
  143. +1 −0 tests/src/gui/CMakeLists.txt
  144. +1 −0 tests/src/providers/CMakeLists.txt
@@ -581,7 +581,6 @@ ELSE (WIN32)

ENDIF(WIN32)

ADD_DEFINITIONS("-DCORE_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DGUI_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DPYTHON_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DANALYSIS_EXPORT=${DLLIMPORT}")
@@ -590,6 +589,7 @@ ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DSERVER_EXPORT=${DLLIMPORT}")

SET(CMAKE_CXX_VISIBILITY_PRESET hidden)
INCLUDE(GenerateExportHeader)

#############################################################
# user-changeable settings which can be used to customize
@@ -120,6 +120,7 @@ INCLUDE_DIRECTORIES(
sip_helpers

${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
${CMAKE_BINARY_DIR}/src/core
)

IF(NOT ANDROID)
@@ -17,7 +17,8 @@ INCLUDE_DIRECTORIES(SYSTEM
)

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../core
${CMAKE_BINARY_DIR}/python/core
${CMAKE_BINARY_DIR}/src/core
../../src/core
../../src/core/auth
../../src/core/pal
@@ -162,6 +162,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/../core/geometry
${CMAKE_CURRENT_SOURCE_DIR}/../core/raster
${CMAKE_CURRENT_SOURCE_DIR}/../core/symbology-ng
${CMAKE_BINARY_DIR}/src/core
interpolation
network
)
@@ -524,6 +524,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} composer legend pluginmanager
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../ui
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES(SYSTEM
${QWT_INCLUDE_DIR}
@@ -1,5 +1,6 @@
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_BINARY_DIR}/src/core
${Qt5Core_INCLUDE_DIRS}
)

@@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES (
../../core
../../core/auth
../../core/geometry
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES (SYSTEM
${QCA_INCLUDE_DIR}
@@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES (
../../core
../../core/auth
../../core/geometry
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES (SYSTEM
${QCA_INCLUDE_DIR}
@@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES (
../../core
../../core/auth
../../core/geometry
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES (SYSTEM
${QCA_INCLUDE_DIR}
@@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES (
../../core
../../core/auth
../../core/geometry
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES (SYSTEM
${QCA_INCLUDE_DIR}
@@ -65,6 +65,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../gui/editorwidgets/core
${CMAKE_CURRENT_BINARY_DIR}/../ui
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES(SYSTEM
${GEOS_INCLUDE_DIR}
@@ -903,6 +903,7 @@ ENDIF (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
auth
composer
dxf
@@ -927,10 +928,6 @@ INCLUDE_DIRECTORIES(SYSTEM
${QCA_INCLUDE_DIR}
)

REMOVE_DEFINITIONS("-DCORE_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("\"-DCORE_EXPORT=${DLLEXPORT}\"")


#for PAL classes
IF (WIN32)
ADD_DEFINITIONS("-D_HAVE_WINDOWS_H_")
@@ -946,6 +943,14 @@ ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"")

ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${QGIS_CORE_HDRS} ${QGIS_CORE_MOC_HDRS})

GENERATE_EXPORT_HEADER(
qgis_core
BASE_NAME CORE
EXPORT_FILE_NAME qgis_core.h
)

SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} ${PROJECT_BINARY_DIR}/qgis_core.h)

IF(ENABLE_MODELTEST)
TARGET_LINK_LIBRARIES(qgis_core ${QT_QTTEST_LIBRARY})
ENDIF(ENABLE_MODELTEST)
@@ -23,6 +23,8 @@
#include <QSslCertificate>
#include <QSslError>

#include "qgis_core.h"

class QgsAuthConfigSslServer;

#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop ).value(0)
@@ -20,6 +20,8 @@
#include <QFile>
#include <QString>

#include "qgis_core.h"

/** \ingroup core
* Funtions for hashing/checking master password and encrypt/decrypting data with password
* \since 2.8
@@ -24,6 +24,8 @@
#include <QStringList>
#include <QUrl>

#include "qgis_core.h"

class QgsAuthMethodConfig;

/** \ingroup core
@@ -19,6 +19,8 @@

#include <QString>

#include "qgis_core.h"

/** \ingroup core
* Holds data auth method key, description, and associated shared library file information.
@@ -22,6 +22,8 @@
#include <QMap>
#include <QString>

#include "qgis_core.h"

class QgsAuthMethod;
class QgsAuthMethodMetadata;

@@ -19,6 +19,9 @@
#define QGSADDREMOVEITEMCOMMAND_H

#include <QUndoCommand>

#include "qgis_core.h"

class QgsComposerItem;
class QgsComposition;

@@ -20,6 +20,8 @@

#include <QUndoCommand>

#include "qgis_core.h"

class QgsComposerMultiFrame;
class QgsComposition;

@@ -21,6 +21,8 @@
#include <QAbstractTableModel>
#include <QSortFilterProxyModel>

#include "qgis_core.h"

class QgsComposerAttributeTableV2;
class QgsComposerTableColumn;

@@ -21,6 +21,8 @@
#include <QGraphicsEffect>
#include <QPainter>

#include "qgis_core.h"

/** \ingroup core
* \class QgsComposerEffect
*/
@@ -21,6 +21,8 @@
#include <QUndoCommand>
#include <QDomDocument>

#include "qgis_core.h"

class QgsComposerItem;
class QgsComposerMultiFrame;

@@ -20,6 +20,8 @@
#include <QGraphicsRectItem>
#include <QObject>

#include "qgis_core.h"

class QgsComposition;
class QgsComposerItem;
class QGraphicsView;
@@ -21,6 +21,8 @@
#include <QUndoCommand>
#include <QDomDocument>

#include "qgis_core.h"

class QgsComposerMultiFrame;

/** \ingroup core
@@ -23,6 +23,8 @@
#include <QDomElement>
#include <QColor>

#include "qgis_core.h"

/** \ingroup core
* Stores properties of a column in a QgsComposerTable. Some properties of a QgsComposerTableColumn
are applicable only in certain contexts. For instance, the attribute and setAttribute methods only
@@ -20,6 +20,8 @@
#include <QIcon>
#include <QRectF>

#include "qgis_core.h"

class QgsComposerScaleBar;
class QPainter;

@@ -20,6 +20,8 @@

#include <QPaintDevice>

#include "qgis_core.h"

class QgsDxfPaintEngine;
class QgsDxfExport;
class QPaintEngine;
@@ -22,6 +22,8 @@
#include <QColor>
#include <QtCore/qmath.h>

#include "qgis_core.h"

class QgsColorRamp;

/** \ingroup core
@@ -21,6 +21,8 @@
#include <QMap>
#include <QString>

#include "qgis_core.h"

/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
* full unit tests in testqgsstatisticalsummary.cpp.
@@ -22,6 +22,8 @@
#include <QObject>
#include <QString>

#include "qgis_core.h"

class QIODevice;

struct CORE_EXPORT QgsSatelliteInfo
@@ -21,6 +21,8 @@
#include <QList>
#include <QSet>

#include "qgis_core.h"

class QgsGPSConnection;

/** \ingroup core
@@ -22,6 +22,7 @@
#include <QList>
#include <QPair>

#include "qgis_core.h"
#include "qextserialport.h"

class QgsGPSConnection;
@@ -19,6 +19,8 @@
#include <QObject>
#include <QStringList>

#include "qgis_core.h"

class QgsLayerTreeGroup;
class QgsLayerTreeNode;
class QgsMapLayer;
@@ -19,6 +19,7 @@
#include <qnamespace.h>
#include <QList>
#include <QPair>
#include "qgis_core.h"

class QDomElement;
class QDomDocument;
@@ -35,6 +35,8 @@
#include <QLinkedList>
#include <geos_c.h>

#include "qgis_core.h"

namespace pal
{

@@ -32,7 +32,8 @@
#include <cmath>
#include <qnumeric.h>

#include <qgswkbtypes.h>
#include "qgswkbtypes.h"
#include "qgis_core.h"

/** \ingroup core
* The Qgis class provides global constants for use throughout the application.
@@ -21,6 +21,8 @@
#include <QDomNode>
#include <QVariant>

#include "qgis_core.h"

class QgsFields;

/** \ingroup core
@@ -21,6 +21,7 @@
class QgsCoordinateReferenceSystem;
class QgsPoint;

#include "qgis_core.h"

/**
* \class QgsBearingUtils
@@ -23,6 +23,8 @@
#include <QPair>
#include <QObject>

#include "qgis_core.h"

/** \ingroup core
* List of colors paired with a friendly display name identifying the color
* \note Added in version 2.5
@@ -23,6 +23,8 @@
#include <QHash>
#include <QProcess>

#include "qgis_core.h"

/** \ingroup core
* Provides a context based help browser for a dialog.
*
@@ -20,6 +20,8 @@

#include <QString>

#include "qgis_core.h"

class QgsPoint;
class QgsCoordinateReferenceSystem;

@@ -23,6 +23,8 @@
#include <QMap>
#include <QMutex>

#include "qgis_core.h"

/** \ingroup core
* Interface for requesting credentials in QGIS in GUI independent way.
* This class provides abstraction of a dialog for requesting credentials to the user.

4 comments on commit 0302719

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn replied Jan 5, 2017

@m-kuhn the make install command is broken, throws the following error:

CMake Error at src/core/cmake_install.cmake:36 (file):
  file INSTALL cannot find "/home/webmaster/dev/cpp/QGIS/bm-qt5/qgis_core.h".
Call Stack (most recent call first):
  src/cmake_install.cmake:37 (include)
  cmake_install.cmake:56 (include)
@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jan 5, 2017

Hmm, no computer with build env in reach at the moment

If you want you can try to change the line below the GENERATE_EXPORT_HEADER instruction to:

SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/qgis_core.h)

(will need to be done for all modules)

@haubourg

This comment has been minimized.

Copy link
Contributor

@haubourg haubourg replied Jan 5, 2017

@m-kuhn same here qgis_core.h missing

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jan 5, 2017

Should be fixed now

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