summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorThomas Moenicke <thomas.moenicke@mapbox.com>2020-02-03 19:10:57 +0200
committerGitHub <noreply@github.com>2020-02-03 19:10:57 +0200
commitb64ed754442b894f3914a4191798fbd2f2bc8cd9 (patch)
tree59bb14829d7cdd5f2466dad4cffb74c4d1b80068 /platform/default
parent2e10d3548a8b3aff1f28b9514594c3c14509f084 (diff)
downloadqtlocation-mapboxgl-b64ed754442b894f3914a4191798fbd2f2bc8cd9.tar.gz
[build] Adding a build flag to build without GL if needed (#16120)
* [build] Adding a build flag to build without GL if needed * [build] Moving custom layer to mbgl/gl
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/src/mbgl/layermanager/layer_manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/default/src/mbgl/layermanager/layer_manager.cpp b/platform/default/src/mbgl/layermanager/layer_manager.cpp
index b8abf794fc..f9e46d78ab 100644
--- a/platform/default/src/mbgl/layermanager/layer_manager.cpp
+++ b/platform/default/src/mbgl/layermanager/layer_manager.cpp
@@ -2,7 +2,9 @@
#include <mbgl/layermanager/background_layer_factory.hpp>
#include <mbgl/layermanager/circle_layer_factory.hpp>
-#include <mbgl/layermanager/custom_layer_factory.hpp>
+#ifdef MBGL_RENDER_BACKEND_OPENGL
+#include <mbgl/gl/custom_layer_factory.hpp>
+#endif
#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
#include <mbgl/layermanager/fill_layer_factory.hpp>
#include <mbgl/layermanager/heatmap_layer_factory.hpp>
@@ -59,9 +61,11 @@ LayerManagerDefault::LayerManagerDefault() {
#if !defined(MBGL_LAYER_HEATMAP_DISABLE_ALL)
addLayerType(std::make_unique<HeatmapLayerFactory>());
#endif
+#ifdef MBGL_RENDER_BACKEND_OPENGL
#if !defined(MBGL_LAYER_CUSTOM_DISABLE_ALL)
addLayerType(std::make_unique<CustomLayerFactory>());
#endif
+#endif
}
void LayerManagerDefault::addLayerType(std::unique_ptr<LayerFactory> factory) {