Skip to content

Commit

Permalink
Move the generated code for MVT to a directory in external/
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Mar 26, 2020
1 parent 617db59 commit f43bd8c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions external/mapbox-vector-tile/README.md
@@ -0,0 +1,15 @@

The .pb.cc and .pb.h are generated by 'protoc' tool and got copied here from https://github.com/TimSC/mbtiles-cpp


Update pbf files
----------------

To update the protobuf files, get vector_tile.proto from https://github.com/mapbox/vector-tile-spec, remove the line "option optimize_for = LITE_RUNTIME;", then

mkdir vector_tile21

protoc vector_tile.proto --cpp_out vector_tile21

protobuf lite is avoided because it doesn't contain SerializeToOstream functionality.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/astyle.sh
Expand Up @@ -105,7 +105,7 @@ astyleit() {

for f in "$@"; do
case "$f" in
src/plugins/grass/qtermwidget/*|external/o2/*|external/qt-unix-signals/*|external/rtree/*|external/astyle/*|external/kdbush/*|external/poly2tri/*|external/wintoast/*|external/qt3dextra-headers/*|external/meshOptimizer/*|python/ext-libs/*|ui_*.py|*.astyle|tests/testdata/*|editors/*|src/core/vectortile/*.pb.*)
src/plugins/grass/qtermwidget/*|external/o2/*|external/qt-unix-signals/*|external/rtree/*|external/astyle/*|external/kdbush/*|external/poly2tri/*|external/wintoast/*|external/qt3dextra-headers/*|external/meshOptimizer/*|python/ext-libs/*|ui_*.py|*.astyle|tests/testdata/*|editors/*)
echo -ne "$f skipped $elcr"
continue
;;
Expand Down
4 changes: 3 additions & 1 deletion src/core/CMakeLists.txt
Expand Up @@ -18,6 +18,8 @@ SET(QGIS_CORE_SRCS
${CMAKE_SOURCE_DIR}/external/poly2tri/sweep/sweep.cc
${CMAKE_SOURCE_DIR}/external/meshOptimizer/simplifier.cpp

${CMAKE_SOURCE_DIR}/external/mapbox-vector-tile/vector_tile.pb.cc

callouts/qgscallout.cpp
callouts/qgscalloutsregistry.cpp

Expand Down Expand Up @@ -643,7 +645,6 @@ SET(QGIS_CORE_SRCS
vectortile/qgsvectortileloader.cpp
vectortile/qgsvectortilemvtdecoder.cpp
vectortile/qgsvectortileutils.cpp
vectortile/vector_tile.pb.cc

${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp

Expand Down Expand Up @@ -1436,6 +1437,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/external/poly2tri
${CMAKE_SOURCE_DIR}/external/rtree/include
${CMAKE_SOURCE_DIR}/external/meshOptimizer
${CMAKE_SOURCE_DIR}/external/mapbox-vector-tile
)

INCLUDE_DIRECTORIES(SYSTEM
Expand Down

0 comments on commit f43bd8c

Please sign in to comment.