diff --git a/gyp/mbgl-headless.gypi b/gyp/mbgl-headless.gypi index 08ac21181..da11c8781 100644 --- a/gyp/mbgl-headless.gypi +++ b/gyp/mbgl-headless.gypi @@ -4,12 +4,32 @@ 'product_name': 'mbgl-headless', 'type': 'static_library', 'standalone_static_library': 1, + 'variables': { + 'cflags_cc': [ + '<@(uv_cflags)', + ], + 'cflags': [ + '<@(uv_cflags)', + ], + }, 'include_dirs': [ '../include', ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ], + 'OTHER_CFLAGS': [ '<@(cflags)' ], + } + }, { + 'cflags_cc': [ '<@(cflags_cc)' ], + 'cflags': [ '<@(cflags)' ], + }] + ], 'sources': [ '../platform/default/headless_view.cpp', '../platform/default/headless_display.cpp', + '../platform/default/caching_http_file_source.cpp', ], }, ], diff --git a/gyp/mbgl-ios.gypi b/gyp/mbgl-ios.gypi index dd1c9c0c2..c26e72849 100644 --- a/gyp/mbgl-ios.gypi +++ b/gyp/mbgl-ios.gypi @@ -36,6 +36,7 @@ '../platform/darwin/string_nsstring.mm', '../platform/darwin/http_request_baton_cocoa.mm', '../platform/darwin/image.mm', + '../platform/default/caching_http_file_source.cpp', ], 'include_dirs': [ '../include', diff --git a/gyp/mbgl-linux.gypi b/gyp/mbgl-linux.gypi index 9d979ddf1..510703140 100644 --- a/gyp/mbgl-linux.gypi +++ b/gyp/mbgl-linux.gypi @@ -35,6 +35,7 @@ '../platform/default/image_reader.cpp', '../platform/default/png_reader.cpp', '../platform/default/jpeg_reader.cpp', + '../platform/default/caching_http_file_source.cpp', ], 'include_dirs': [ '../include', diff --git a/gyp/mbgl-osx.gypi b/gyp/mbgl-osx.gypi index 76c22f5ad..015ee13ab 100644 --- a/gyp/mbgl-osx.gypi +++ b/gyp/mbgl-osx.gypi @@ -11,6 +11,7 @@ '../platform/darwin/string_nsstring.mm', '../platform/darwin/http_request_baton_cocoa.mm', '../platform/darwin/image.mm', + '../platform/default/caching_http_file_source.cpp', ], 'include_dirs': [ '../include', diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index e97c63138..718efbf14 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -32,7 +32,7 @@ class Map : private util::noncopyable { typedef void (*stop_callback)(void *); public: - explicit Map(View &view); + explicit Map(View&, FileSource&); ~Map(); // Start the map render thread. It is asynchronous. @@ -177,7 +177,7 @@ private: Transform transform; TransformState state; - util::ptr fileSource; + FileSource& fileSource; util::ptr