[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
This commit is contained in:
Thomas Moenicke
2020-02-03 19:10:57 +02:00
committed by GitHub
parent 2e10d3548a
commit b64ed75444
26 changed files with 186 additions and 158 deletions

View File

@@ -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) {