Skip to content

Commit 1693140

Browse files
committed
Add qgis_server with SERVER_EXPORT macro
1 parent 38a8dda commit 1693140

16 files changed

Lines changed: 23 additions & 5 deletions

‎CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ ELSE (WIN32)
582582
ENDIF(WIN32)
583583

584584
ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
585-
ADD_DEFINITIONS("-DSERVER_EXPORT=${DLLIMPORT}")
586585

587586
SET(CMAKE_CXX_VISIBILITY_PRESET hidden)
588587
INCLUDE(GenerateExportHeader)

‎src/server/CMakeLists.txt‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ SET(qgis_mapserv_SRCS ${qgis_mapserv_SRCS}
101101
)
102102
ENDIF (WITH_SERVER_PLUGINS)
103103

104-
REMOVE_DEFINITIONS("-DSERVER_EXPORT=${DLLIMPORT}")
105-
ADD_DEFINITIONS("\"-DSERVER_EXPORT=${DLLEXPORT}\"")
106-
107-
108104
QT5_WRAP_CPP(qgis_mapserv_MOC_SRCS ${qgis_mapserv_MOC_HDRS})
109105

110106
IF(MSVC)
@@ -198,6 +194,7 @@ INCLUDE_DIRECTORIES(
198194
${CMAKE_BINARY_DIR}/src/gui
199195
${CMAKE_BINARY_DIR}/src/python
200196
${CMAKE_BINARY_DIR}/src/analysis
197+
${CMAKE_BINARY_DIR}/src/server
201198
../core
202199
../core/auth
203200
../core/dxf
@@ -225,6 +222,14 @@ TARGET_LINK_LIBRARIES(qgis_mapserv.fcgi
225222
${QCA_LIBRARY}
226223
)
227224

225+
GENERATE_EXPORT_HEADER(
226+
qgis_server
227+
BASE_NAME SERVER
228+
EXPORT_FILE_NAME qgis_server.h
229+
)
230+
231+
SET(QGIS_SERVER_HDRS ${QGIS_SERVER_HDRS} ${PROJECT_BINARY_DIR}/qgis_server.h)
232+
228233
########################################################
229234
# Install
230235

‎src/server/qgsaccesscontrol.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "qgsaccesscontrolfilter.h"
2323

2424
#include <QMultiMap>
25+
#include "qgis_server.h"
2526

2627
class QgsAccessControlPlugin;
2728

‎src/server/qgsaccesscontrolfilter.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <QMultiMap>
2424
#include <QList>
2525
#include <QString>
26+
#include "qgis_server.h"
2627

2728
class QgsServerInterface;
2829
class QgsMapLayer;

‎src/server/qgscapabilitiescache.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <QFileSystemWatcher>
2323
#include <QHash>
2424
#include <QObject>
25+
#include "qgis_server.h"
2526

2627
/** \ingroup server
2728
* A cache for capabilities xml documents (by configuration file path)

‎src/server/qgsconfigcache.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <QFileSystemWatcher>
2525
#include <QMap>
2626
#include <QObject>
27+
#include "qgis_server.h"
2728

2829
class QgsServerProjectParser;
2930
class QgsWCSProjectParser;

‎src/server/qgsmapserviceexception.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <QString>
2222

2323
#include "qgsexception.h"
24+
#include "qgis_server.h"
2425

2526
/** \ingroup server
2627
* \class QgsMapServiceException

‎src/server/qgsserver.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "qgsserverplugins.h"
4040
#include "qgsserverfilter.h"
4141
#include "qgsserverinterfaceimpl.h"
42+
#include "qgis_server.h"
4243
#endif
4344

4445

‎src/server/qgsserverfilter.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define QGSSERVERFILTER_H
2222

2323
#include <QMultiMap>
24+
#include "qgis_server.h"
2425

2526
class QgsServerInterface;
2627

‎src/server/qgsserverinterface.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "qgsserverfilter.h"
2727
#include "qgsaccesscontrolfilter.h"
2828
#include "qgsaccesscontrol.h"
29+
#include "qgis_server.h"
2930

3031
/**
3132
* \ingroup server

0 commit comments

Comments
 (0)