mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 01:45:41 +02:00
Add a MLT=0 build for a tippecanoe without MapLibre Tile support
MapLibre Tile support pulls in the maplibre-tile-spec submodule and needs cmake to build it, which is a lot to ask of anyone who only wants to work with Mapbox Vector Tiles. `make MLT=0` compiles with -DNO_MLT, skips the submodule and its cmake build entirely, and drops the MLT tests from `make test`. The result needs no dependencies beyond the ones MVT already needed, and can be built from a checkout with no submodules at all. Everything that touches the MLT library is behind the #ifdef, which is just the two files that were written for it. The option parsing and the tile format helpers stay compiled either way, so nothing else needs to know: --output-format=mlt reports that the build has no MLT support rather than being an unrecognized value, and a tile that is recognized as MLT reports the same instead of being misparsed as a protobuf, since the format sniffing itself doesn't need the library. CI builds and tests this configuration from a checkout without submodules, so it can't quietly stop working. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LxhELiLtpUFwrPSWwTYdHG
This commit is contained in:
@@ -24,14 +24,17 @@ const char *tile_format_extension(int format);
|
||||
// options were selected on the command line
|
||||
std::string encode_tile(mvt_tile &tile, int format);
|
||||
|
||||
#ifndef NO_MLT
|
||||
std::string encode_as_mlt(const mvt_tile &tile, bool sort_features, bool pretessellate);
|
||||
#endif
|
||||
|
||||
// Does this (already decompressed) tile look like MapLibre Tile rather than
|
||||
// Mapbox Vector Tile data?
|
||||
bool is_mlt(const std::string &message);
|
||||
|
||||
// Decode a MapLibre Tile into the equivalent vector tile, returning false
|
||||
// (and complaining to stderr) if it can't be parsed.
|
||||
// (and complaining to stderr) if it can't be parsed, or if this build
|
||||
// doesn't have MLT support compiled in.
|
||||
bool decode_mlt(const std::string &message, mvt_tile &out);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user