summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-21 15:37:58 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-22 12:09:14 -0800
commitb60b6c47c0a13b98a0eee29e3b05eb4f9369012a (patch)
tree0f1a126a1210b20f1b64e349bb7883cb955cfdb8
parentab0efe5d00aaa7c468e9f398b1a098f0e89c4112 (diff)
downloadqtlocation-mapboxgl-b60b6c47c0a13b98a0eee29e3b05eb4f9369012a.tar.gz
[core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
-rw-r--r--Makefile6
-rw-r--r--bin/render.gypi1
-rw-r--r--gyp/cache-sqlite.gypi60
-rw-r--r--gyp/install.gypi1
-rw-r--r--gyp/mbgl.gyp1
-rw-r--r--gyp/platform-android.gypi8
-rw-r--r--gyp/platform-ios.gypi7
-rw-r--r--gyp/platform-linux.gypi8
-rw-r--r--gyp/platform-osx.gypi13
-rw-r--r--gyp/standalone.gypi2
-rw-r--r--ios/app/mapboxgl-app.gypi1
-rw-r--r--ios/benchmark/benchmark-ios.gypi1
-rw-r--r--platform/android/mapboxgl-app.gypi1
-rw-r--r--platform/android/scripts/defaults.mk1
-rw-r--r--platform/ios/scripts/defaults.mk1
-rwxr-xr-xplatform/ios/scripts/package.sh2
-rw-r--r--platform/linux/mapboxgl-app.gypi1
-rw-r--r--platform/linux/scripts/defaults.mk1
-rw-r--r--platform/osx/scripts/defaults.mk1
-rw-r--r--platform/osx/sdk/framework-osx.gypi1
-rw-r--r--scripts/main.mk3
-rw-r--r--test/test.gypi1
22 files changed, 41 insertions, 81 deletions
diff --git a/Makefile b/Makefile
index 4b58df5892..95f4610d13 100644
--- a/Makefile
+++ b/Makefile
@@ -96,16 +96,16 @@ apackage: android-lib-mips
# Builds the Node.js library
.PHONY: node
-node: ; $(RUN) HTTP=none ASSET=none CACHE=none Makefile/node
+node: ; $(RUN) HTTP=none ASSET=none Makefile/node
.PHONY: Xcode/node
-Xcode/node: ; $(RUN) HTTP=none ASSET=none CACHE=none Xcode/node
+Xcode/node: ; $(RUN) HTTP=none ASSET=none Xcode/node
.PHONY: xnode
xnode: Xcode/node ; @open ./build/binding.xcodeproj
nproj:
- $(RUN) HTTP=none ASSET=none CACHE=none node/xproj
+ $(RUN) HTTP=none ASSET=none node/xproj
@open ./build/binding.xcodeproj
.PHONY: test
diff --git a/bin/render.gypi b/bin/render.gypi
index c01a75f8c3..1a44d7a9ce 100644
--- a/bin/render.gypi
+++ b/bin/render.gypi
@@ -13,7 +13,6 @@
'mbgl.gyp:headless-<(headless_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
'mbgl.gyp:copy_certificate_bundle',
],
diff --git a/gyp/cache-sqlite.gypi b/gyp/cache-sqlite.gypi
deleted file mode 100644
index 54774a4f05..0000000000
--- a/gyp/cache-sqlite.gypi
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- 'targets': [
- { 'target_name': 'cache-sqlite',
- 'product_name': 'mbgl-cache-sqlite',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'hard_dependency': 1,
-
- 'sources': [
- '../platform/default/sqlite_cache.cpp',
- '../platform/default/sqlite3.hpp',
- '../platform/default/sqlite3.cpp',
- ],
-
- 'include_dirs': [
- '../include',
- '../src',
- ],
-
- 'variables': {
- 'cflags_cc': [
- '<@(sqlite_cflags)',
- ],
- 'ldflags': [
- '<@(sqlite_ldflags)',
- '<@(zlib_ldflags)',
- ],
- 'libraries': [
- '<@(sqlite_static_libs)',
- '<@(zlib_static_libs)',
- ],
- },
-
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
- },
- }, {
- 'cflags_cc': [ '<@(cflags_cc)' ],
- }],
- ],
-
- 'link_settings': {
- 'conditions': [
- ['OS == "mac"', {
- 'libraries': [ '<@(libraries)' ],
- 'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] }
- }, {
- 'libraries': [ '<@(libraries)', '<@(ldflags)' ],
- }]
- ],
- },
-
- 'direct_dependent_settings': {
- 'include_dirs': [ '../include' ],
- },
- },
- ],
-}
diff --git a/gyp/install.gypi b/gyp/install.gypi
index 01857aa562..069686fe8b 100644
--- a/gyp/install.gypi
+++ b/gyp/install.gypi
@@ -8,7 +8,6 @@
'platform-<(platform_lib)',
'http-<(http_lib)',
'asset-<(asset_lib)',
- 'cache-<(cache_lib)',
'headless-<(headless_lib)',
'standalone',
],
diff --git a/gyp/mbgl.gyp b/gyp/mbgl.gyp
index c2c8d9c261..2a43afed8b 100644
--- a/gyp/mbgl.gyp
+++ b/gyp/mbgl.gyp
@@ -20,7 +20,6 @@
['http_lib == "android" and host == "android"', { 'includes': [ 'http-android.gypi' ] } ],
['asset_lib == "fs"', { 'includes': [ 'asset-fs.gypi' ] } ],
['asset_lib == "zip"', { 'includes': [ 'asset-zip.gypi' ] } ],
- ['cache_lib == "sqlite"', { 'includes': [ 'cache-sqlite.gypi' ] } ],
['install_prefix != ""', { 'includes': ['install.gypi' ] } ],
],
diff --git a/gyp/platform-android.gypi b/gyp/platform-android.gypi
index 89f624657d..22558a237a 100644
--- a/gyp/platform-android.gypi
+++ b/gyp/platform-android.gypi
@@ -22,6 +22,9 @@
'../platform/default/timer.cpp',
'../platform/default/default_file_source.cpp',
'../platform/default/online_file_source.cpp',
+ '../platform/default/sqlite_cache.cpp',
+ '../platform/default/sqlite3.hpp',
+ '../platform/default/sqlite3.cpp',
],
'variables': {
@@ -32,18 +35,23 @@
'<@(nunicode_cflags)',
'<@(boost_cflags)',
'<@(variant_cflags)',
+ '<@(sqlite_cflags)',
],
'ldflags': [
'<@(libpng_ldflags)',
'<@(jpeg_ldflags)',
'<@(libuv_ldflags)',
'<@(nunicode_ldflags)',
+ '<@(sqlite_ldflags)',
+ '<@(zlib_ldflags)',
],
'libraries': [
'<@(libpng_static_libs)',
'<@(jpeg_static_libs)',
'<@(libuv_static_libs)',
'<@(nunicode_static_libs)',
+ '<@(sqlite_static_libs)',
+ '<@(zlib_static_libs)',
],
},
diff --git a/gyp/platform-ios.gypi b/gyp/platform-ios.gypi
index 4383efd947..a49f0c5e98 100644
--- a/gyp/platform-ios.gypi
+++ b/gyp/platform-ios.gypi
@@ -15,6 +15,9 @@
'../platform/default/timer.cpp',
'../platform/default/default_file_source.cpp',
'../platform/default/online_file_source.cpp',
+ '../platform/default/sqlite_cache.cpp',
+ '../platform/default/sqlite3.hpp',
+ '../platform/default/sqlite3.cpp',
'../platform/darwin/log_nslog.mm',
'../platform/darwin/string_nsstring.mm',
'../platform/darwin/application_root.mm',
@@ -85,9 +88,13 @@
'<@(libuv_cflags)',
'<@(boost_cflags)',
'<@(variant_cflags)',
+ '<@(sqlite_cflags)',
+ '<@(zlib_cflags)',
],
'libraries': [
'<@(libuv_static_libs)',
+ '<@(sqlite_static_libs)',
+ '<@(zlib_static_libs)',
],
'ldflags': [
'-framework CoreLocation',
diff --git a/gyp/platform-linux.gypi b/gyp/platform-linux.gypi
index a3ed71b04f..00595aa720 100644
--- a/gyp/platform-linux.gypi
+++ b/gyp/platform-linux.gypi
@@ -23,6 +23,9 @@
'../platform/default/timer.cpp',
'../platform/default/default_file_source.cpp',
'../platform/default/online_file_source.cpp',
+ '../platform/default/sqlite_cache.cpp',
+ '../platform/default/sqlite3.hpp',
+ '../platform/default/sqlite3.cpp',
],
'variables': {
@@ -32,18 +35,23 @@
'<@(libuv_cflags)',
'<@(nunicode_cflags)',
'<@(boost_cflags)',
+ '<@(sqlite_cflags)',
],
'ldflags': [
'<@(libpng_ldflags)',
'<@(jpeg_ldflags)',
'<@(libuv_ldflags)',
'<@(nunicode_ldflags)',
+ '<@(sqlite_ldflags)',
+ '<@(zlib_ldflags)',
],
'libraries': [
'<@(libpng_static_libs)',
'<@(jpeg_static_libs)',
'<@(libuv_static_libs)',
'<@(nunicode_static_libs)',
+ '<@(sqlite_static_libs)',
+ '<@(zlib_static_libs)',
],
},
diff --git a/gyp/platform-osx.gypi b/gyp/platform-osx.gypi
index 9af1cbd77a..ed4abea68f 100644
--- a/gyp/platform-osx.gypi
+++ b/gyp/platform-osx.gypi
@@ -15,6 +15,9 @@
'../platform/default/timer.cpp',
'../platform/default/default_file_source.cpp',
'../platform/default/online_file_source.cpp',
+ '../platform/default/sqlite_cache.cpp',
+ '../platform/default/sqlite3.hpp',
+ '../platform/default/sqlite3.cpp',
'../platform/darwin/log_nslog.mm',
'../platform/darwin/string_nsstring.mm',
'../platform/darwin/application_root.mm',
@@ -59,9 +62,16 @@
'<@(libuv_cflags)',
'<@(boost_cflags)',
'<@(variant_cflags)',
+ '<@(sqlite_cflags)',
+ '<@(zlib_cflags)',
+ ],
+ 'ldflags': [
+ '<@(zlib_ldflags)',
],
'libraries': [
'<@(libuv_static_libs)',
+ '<@(sqlite_static_libs)',
+ '<@(zlib_static_libs)',
'$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
@@ -85,6 +95,9 @@
'link_settings': {
'libraries': [ '<@(libraries)' ],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [ '<@(ldflags)' ],
+ },
},
'direct_dependent_settings': {
diff --git a/gyp/standalone.gypi b/gyp/standalone.gypi
index 7f222016cd..732682cdf2 100644
--- a/gyp/standalone.gypi
+++ b/gyp/standalone.gypi
@@ -9,7 +9,6 @@
'platform-<(platform_lib)',
'http-<(http_lib)',
'asset-<(asset_lib)',
- 'cache-<(cache_lib)',
'headless-<(headless_lib)',
],
},
@@ -24,7 +23,6 @@
'platform-<(platform_lib)',
'http-<(http_lib)',
'asset-<(asset_lib)',
- 'cache-<(cache_lib)',
'headless-<(headless_lib)',
],
},
diff --git a/ios/app/mapboxgl-app.gypi b/ios/app/mapboxgl-app.gypi
index 799cb62e78..def04cdc3f 100644
--- a/ios/app/mapboxgl-app.gypi
+++ b/ios/app/mapboxgl-app.gypi
@@ -22,7 +22,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
],
'sources': [
diff --git a/ios/benchmark/benchmark-ios.gypi b/ios/benchmark/benchmark-ios.gypi
index ccdcc10f3b..4ed3535cad 100644
--- a/ios/benchmark/benchmark-ios.gypi
+++ b/ios/benchmark/benchmark-ios.gypi
@@ -20,7 +20,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
],
'sources': [
diff --git a/platform/android/mapboxgl-app.gypi b/platform/android/mapboxgl-app.gypi
index 128a5ebba9..84304ec2d9 100644
--- a/platform/android/mapboxgl-app.gypi
+++ b/platform/android/mapboxgl-app.gypi
@@ -13,7 +13,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
],
'include_dirs': [
diff --git a/platform/android/scripts/defaults.mk b/platform/android/scripts/defaults.mk
index d5e87c6796..5f049aae48 100644
--- a/platform/android/scripts/defaults.mk
+++ b/platform/android/scripts/defaults.mk
@@ -2,7 +2,6 @@ HEADLESS ?= none
PLATFORM ?= android
ASSET ?= zip
HTTP ?= android
-CACHE ?= sqlite
GYP_FLAVOR_SUFFIX=-android
diff --git a/platform/ios/scripts/defaults.mk b/platform/ios/scripts/defaults.mk
index fafc332133..c2a3e95eeb 100644
--- a/platform/ios/scripts/defaults.mk
+++ b/platform/ios/scripts/defaults.mk
@@ -2,7 +2,6 @@ HEADLESS = none
PLATFORM ?= ios
ASSET ?= fs
HTTP ?= nsurl
-CACHE ?= sqlite
HOST_VERSION = all
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index d067e67eab..f1a67bb8f2 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -79,7 +79,7 @@ xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
step "Building static library..."
-LIBS=(core.a platform-ios.a asset-fs.a cache-sqlite.a http-nsurl.a)
+LIBS=(core.a platform-ios.a asset-fs.a http-nsurl.a)
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
libtool -static -no_warning_for_no_symbols \
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \
diff --git a/platform/linux/mapboxgl-app.gypi b/platform/linux/mapboxgl-app.gypi
index c3e66101a9..96ada0b93e 100644
--- a/platform/linux/mapboxgl-app.gypi
+++ b/platform/linux/mapboxgl-app.gypi
@@ -12,7 +12,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
'mbgl.gyp:copy_certificate_bundle',
],
diff --git a/platform/linux/scripts/defaults.mk b/platform/linux/scripts/defaults.mk
index 126c8f99a4..c387135bb1 100644
--- a/platform/linux/scripts/defaults.mk
+++ b/platform/linux/scripts/defaults.mk
@@ -2,4 +2,3 @@ HEADLESS ?= glx
PLATFORM ?= linux
ASSET ?= fs
HTTP ?= curl
-CACHE ?= sqlite
diff --git a/platform/osx/scripts/defaults.mk b/platform/osx/scripts/defaults.mk
index f148f66d8a..94dda854fa 100644
--- a/platform/osx/scripts/defaults.mk
+++ b/platform/osx/scripts/defaults.mk
@@ -2,4 +2,3 @@ HEADLESS ?= cgl
PLATFORM ?= osx
ASSET ?= fs
HTTP ?= nsurl
-CACHE ?= sqlite
diff --git a/platform/osx/sdk/framework-osx.gypi b/platform/osx/sdk/framework-osx.gypi
index 3c3fb607af..3f03f9edaf 100644
--- a/platform/osx/sdk/framework-osx.gypi
+++ b/platform/osx/sdk/framework-osx.gypi
@@ -14,7 +14,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
],
'xcode_settings': {
diff --git a/scripts/main.mk b/scripts/main.mk
index e8fd6d3764..4d30d811b4 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -75,7 +75,6 @@ GYP_FLAGS += -Iconfig/$(HOST_SLUG).gypi
GYP_FLAGS += -Dplatform_lib=$(PLATFORM)
GYP_FLAGS += -Dhttp_lib=$(HTTP)
GYP_FLAGS += -Dasset_lib=$(ASSET)
-GYP_FLAGS += -Dcache_lib=$(CACHE)
GYP_FLAGS += -Dheadless_lib=$(HEADLESS)
GYP_FLAGS += -Dtest=$(BUILD_TEST)
GYP_FLAGS += -Drender=$(BUILD_RENDER)
@@ -177,7 +176,7 @@ print-env: $(SUBMODULES)
@printf "platform=$(COLOR_CYAN)%s$(FORMAT_END) " $(PLATFORM)
@printf "asset=$(COLOR_CYAN)%s$(FORMAT_END) " $(ASSET)
@printf "http=$(COLOR_CYAN)%s$(FORMAT_END) " $(HTTP)
- @printf "cache=$(COLOR_CYAN)%s$(FORMAT_END)\n" $(CACHE)
+ @printf "\n"
# Never remove intermediate files
.SECONDARY:
diff --git a/test/test.gypi b/test/test.gypi
index 6227d49750..4f43334416 100644
--- a/test/test.gypi
+++ b/test/test.gypi
@@ -24,7 +24,6 @@
'mbgl.gyp:platform-<(platform_lib)',
'mbgl.gyp:http-<(http_lib)',
'mbgl.gyp:asset-<(asset_lib)',
- 'mbgl.gyp:cache-<(cache_lib)',
'mbgl.gyp:headless-<(headless_lib)',
],
'sources': [