* Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
75 lines
1.7 KiB
Python
75 lines
1.7 KiB
Python
{
|
|
'targets': [
|
|
{ 'target_name': 'asset-zip',
|
|
'product_name': 'mbgl-asset-zip',
|
|
'type': 'static_library',
|
|
'standalone_static_library': 1,
|
|
'hard_dependency': 1,
|
|
|
|
'sources': [
|
|
'../platform/android/src/asset_file_source.cpp',
|
|
],
|
|
|
|
'include_dirs': [
|
|
'../include',
|
|
'../src',
|
|
],
|
|
|
|
'variables': {
|
|
'cflags': [
|
|
'<@(libzip_cflags)',
|
|
],
|
|
'cflags_cc': [
|
|
'<@(libzip_cflags)',
|
|
],
|
|
'ldflags': [
|
|
'<@(libzip_ldflags)',
|
|
],
|
|
'libraries': [
|
|
'<@(libzip_static_libs)',
|
|
],
|
|
'defines': [
|
|
'-DMBGL_ASSET_ZIP'
|
|
],
|
|
},
|
|
|
|
'conditions': [
|
|
['OS == "mac"', {
|
|
'xcode_settings': {
|
|
'OTHER_CFLAGS': [ '<@(cflags)' ],
|
|
'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
|
|
},
|
|
}, {
|
|
'cflags': [ '<@(cflags)' ],
|
|
'cflags_cc': [ '<@(cflags_cc)' ],
|
|
}],
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
'conditions': [
|
|
['OS == "mac"', {
|
|
'xcode_settings': {
|
|
'OTHER_CFLAGS': [ '<@(defines)' ],
|
|
'OTHER_CPLUSPLUSFLAGS': [ '<@(defines)' ],
|
|
}
|
|
}, {
|
|
'cflags': [ '<@(defines)' ],
|
|
'cflags_cc': [ '<@(defines)' ],
|
|
}]
|
|
],
|
|
},
|
|
|
|
'link_settings': {
|
|
'conditions': [
|
|
['OS == "mac"', {
|
|
'libraries': [ '<@(libraries)' ],
|
|
'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] }
|
|
}, {
|
|
'libraries': [ '<@(libraries)', '<@(ldflags)' ],
|
|
}]
|
|
],
|
|
},
|
|
},
|
|
],
|
|
}
|