diff --git a/.gitmodules b/.gitmodules index 2aa6d52be..0152ed56b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,6 +14,3 @@ path = platform/ios/vendor/SMCalloutView url = https://github.com/nfarina/calloutview.git -[submodule "src/mbgl/util/geojsonvt"] - path = src/mbgl/util/geojsonvt - url = https://github.com/mapbox/geojson-vt-cpp diff --git a/configure b/configure index 6fbaa9f7f..6d0ac780c 100755 --- a/configure +++ b/configure @@ -15,8 +15,15 @@ function abort { >&2 echo -e "\033[1m\033[31m$1\033[0m"; exit 1; } function info { >&2 echo -e "\033[1m\033[33m$1\033[0m"; } function warn { >&2 echo -e "\033[1m\033[33m$1\033[0m"; } -# Install mason -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" +if [ -d "`pwd`/.git" ]; then + info "This build is within a git repository" + export MASON_DIR="`pwd`/.mason" + export PATH="${MASON_DIR}:${PATH}" +else + info "This build is NOT within a git repository" + which mason || abort "You must install mason to build mapbox-gl-native (https://github.com/mapbox/mason)" + export MASON_DIR="$(dirname $(readlink $(which mason)))" +fi # You can override the function for a particular set of flags by defining a # print_XXX_flags function in your dependencies.sh file @@ -37,6 +44,23 @@ function print_flags { fi } +function print_build_flags { + local NAME=$1; shift + if [ "$(type -t print_${NAME}_flags)" = 'function' ]; then + print_${NAME}_flags + else + local VERSION=`echo "${NAME}_VERSION" | tr "[:lower:]" "[:upper:]"` + if [ ! -z ${!VERSION:-} ] ; then + mason build ${NAME} ${!VERSION} + for FLAGS in "$@" ; do + CONFIG+=" '${NAME}_${FLAGS}%': $(quote_flags $(mason ${FLAGS} ${NAME} ${!VERSION})),"$LN + done + else + warn "* Not using ${NAME}" + fi + fi +} + function print_default_flags { : } @@ -93,6 +117,8 @@ print_flags libuv static_libs cflags ldflags print_flags zlib static_libs cflags ldflags print_flags nunicode static_libs cflags ldflags print_flags libzip static_libs cflags ldflags +print_build_flags geojsonvt static_libs cflags ldflags +print_flags variant static_libs cflags ldflags CONFIG+=" } } diff --git a/gyp/core.gypi b/gyp/core.gypi index f9b361032..51009be69 100644 --- a/gyp/core.gypi +++ b/gyp/core.gypi @@ -31,10 +31,14 @@ '<@(libuv_cflags)', '<@(opengl_cflags)', '<@(boost_cflags)', + '<@(geojsonvt_cflags)', + '<@(variant_cflags)', ], 'cflags': [ '<@(libuv_cflags)', '<@(opengl_cflags)', + '<@(geojsonvt_cflags)', + '<@(variant_cflags)', '-fPIC' ], 'ldflags': [ @@ -43,6 +47,7 @@ ], 'libraries': [ '<@(libuv_static_libs)', + '<@(geojsonvt_static_libs)', ], }, diff --git a/gyp/version.gypi b/gyp/version.gypi index 1cc2eb351..4efdd079a 100644 --- a/gyp/version.gypi +++ b/gyp/version.gypi @@ -13,7 +13,7 @@ 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/util/version.hpp', ], - 'action': ['<@(_inputs)', '<(SHARED_INTERMEDIATE_DIR)', ' + #include #include #include #include #include #include -#include #include #include diff --git a/src/mbgl/map/annotation.hpp b/src/mbgl/map/annotation.hpp index 5adec162f..6b80d9f6c 100644 --- a/src/mbgl/map/annotation.hpp +++ b/src/mbgl/map/annotation.hpp @@ -1,13 +1,14 @@ #ifndef MBGL_MAP_ANNOTATIONS #define MBGL_MAP_ANNOTATIONS +#include + #include #include #include #include #include #include -#include #include #include diff --git a/src/mbgl/util/geojsonvt b/src/mbgl/util/geojsonvt deleted file mode 160000 index 995ffc72c..000000000 --- a/src/mbgl/util/geojsonvt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 995ffc72c556da4b4880a6036fbcf7159fc5ecce diff --git a/test/test.gypi b/test/test.gypi index a35b00133..c53263bd5 100644 --- a/test/test.gypi +++ b/test/test.gypi @@ -95,6 +95,7 @@ 'libraries': [ '<@(libuv_static_libs)', '<@(sqlite_static_libs)', + '<@(geojsonvt_static_libs)', ], 'variables': { 'cflags_cc': [ @@ -102,6 +103,8 @@ '<@(opengl_cflags)', '<@(boost_cflags)', '<@(sqlite_cflags)', + '<@(geojsonvt_cflags)', + '<@(variant_cflags)', ], 'ldflags': [ '<@(libuv_ldflags)',