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 c2cb2eed5..a2e6f65ba 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', '../platform/default/asset_request_baton_noop.cpp', ], 'include_dirs': [ diff --git a/gyp/mbgl-linux.gypi b/gyp/mbgl-linux.gypi index 5bfa8f757..2f402075a 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', '../platform/default/asset_request_baton_noop.cpp', ], 'include_dirs': [ diff --git a/gyp/mbgl-osx.gypi b/gyp/mbgl-osx.gypi index 0ca00a81e..d0eae5673 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', '../platform/default/asset_request_baton_noop.cpp', ], 'include_dirs': [ diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 2f81a2bd8..f222036bf 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -34,7 +34,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. @@ -197,7 +197,7 @@ private: Transform transform; TransformState state; - util::ptr fileSource; + FileSource& fileSource; util::ptr