summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mapbox-gl-native.pro1
-rw-r--r--platform/qt/include/qmapbox.hpp10
2 files changed, 8 insertions, 3 deletions
diff --git a/mapbox-gl-native.pro b/mapbox-gl-native.pro
index 7ae7f13ecf..81260950cc 100644
--- a/mapbox-gl-native.pro
+++ b/mapbox-gl-native.pro
@@ -12,6 +12,7 @@ QT += network-private \
QMAKE_CXXFLAGS += \
-DNDEBUG \
-DQT_IMAGE_DECODERS \
+ -DQT_BUILD_MAPBOXGL_LIB \
-DRAPIDJSON_HAS_STDSTRING=1 \
-DMBGL_USE_GLES2 \
-D__QT__ \
diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp
index 369890343f..1ab04403cf 100644
--- a/platform/qt/include/qmapbox.hpp
+++ b/platform/qt/include/qmapbox.hpp
@@ -9,10 +9,14 @@
// This header follows the Qt coding style: https://wiki.qt.io/Qt_Coding_Style
-#if defined(QT_BUILD_MAPBOXGL_LIB)
- #define Q_MAPBOXGL_EXPORT Q_DECL_EXPORT
+#if !defined(QT_MAPBOXGL_STATIC)
+# if defined(QT_BUILD_MAPBOXGL_LIB)
+# define Q_MAPBOXGL_EXPORT Q_DECL_EXPORT
+# else
+# define Q_MAPBOXGL_EXPORT Q_DECL_IMPORT
+# endif
#else
- #define Q_MAPBOXGL_EXPORT Q_DECL_IMPORT
+# define Q_MAPBOXGL_EXPORT
#endif
namespace QMapbox {