summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-06-03 18:05:04 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-08-05 11:42:22 +0200
commit692fe1f3ffc8f4364b39c14aa7d90cec2ff5c0a6 (patch)
tree1d08af7d56e986dba2b548ff9b9a7e1a77c713ed /platform/android
parente3ee55b28d0b230d054c9718f79a1f6d685cd62b (diff)
downloadqtlocation-mapboxgl-692fe1f3ffc8f4364b39c14aa7d90cec2ff5c0a6.tar.gz
[build] switch to CMake
This is very much a work in progress.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/bitrise.yml2
-rw-r--r--platform/android/platform.gyp166
-rw-r--r--platform/android/scripts/configure.sh22
3 files changed, 1 insertions, 189 deletions
diff --git a/platform/android/bitrise.yml b/platform/android/bitrise.yml
index 5eb5cfa508..b7508f3836 100644
--- a/platform/android/bitrise.yml
+++ b/platform/android/bitrise.yml
@@ -31,7 +31,7 @@ workflows:
#!/bin/bash
set -eu -o pipefail
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
- sudo apt-get install -y pkg-config nodejs
+ sudo apt-get install -y pkg-config nodejs cmake
export BUILDTYPE=Release
make android
make test-android
diff --git a/platform/android/platform.gyp b/platform/android/platform.gyp
deleted file mode 100644
index f8e8b33b08..0000000000
--- a/platform/android/platform.gyp
+++ /dev/null
@@ -1,166 +0,0 @@
-{
- 'variables': {
- 'loop_lib': 'android',
- 'OS': 'android',
- 'headless_lib': 'none',
- 'coverage': 0,
- },
- 'includes': [
- '../../mbgl.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'platform-lib',
- 'product_name': 'mapbox-gl',
- 'type': 'shared_library',
- 'hard_dependency': 1,
- 'dependencies': [
- 'core',
- ],
-
- 'include_dirs': [
- '../default',
- '../../include',
- '../../src', # TODO: eliminate
- ],
-
- 'sources': [
- 'src/native_map_view.cpp',
- 'src/jni.cpp',
- 'src/java_types.cpp',
- 'src/attach_env.cpp',
- 'src/log_android.cpp',
- 'src/http_file_source.cpp',
- 'src/asset_file_source.cpp',
- 'src/thread.cpp',
- 'src/style/value.cpp',
- 'src/style/sources/sources.cpp',
- 'src/style/layers/layers.cpp',
- 'src/style/layers/layer.cpp',
- 'src/style/layers/background_layer.cpp',
- 'src/style/layers/circle_layer.cpp',
- 'src/style/layers/fill_layer.cpp',
- 'src/style/layers/line_layer.cpp',
- 'src/style/layers/raster_layer.cpp',
- 'src/style/layers/symbol_layer.cpp',
- 'src/style/layers/custom_layer.cpp',
- '../default/string_stdlib.cpp',
- '../default/image.cpp',
- '../default/png_reader.cpp',
- '../default/jpeg_reader.cpp',
- '../default/default_file_source.cpp',
- '../default/online_file_source.cpp',
- '../default/mbgl/storage/offline.hpp',
- '../default/mbgl/storage/offline.cpp',
- '../default/mbgl/storage/offline_database.hpp',
- '../default/mbgl/storage/offline_database.cpp',
- '../default/mbgl/storage/offline_download.hpp',
- '../default/mbgl/storage/offline_download.cpp',
- '../default/sqlite3.hpp',
- '../default/sqlite3.cpp',
- ],
-
- 'cflags_cc': [
- '<@(boost_cflags)',
- '<@(geojson_cflags)',
- '<@(rapidjson_cflags)',
- '<@(nunicode_cflags)',
- '<@(sqlite_cflags)',
- '<@(jni.hpp_cflags)',
- '<@(libzip_cflags)',
- '<@(libpng_cflags)',
- '<@(libjpeg-turbo_cflags)',
- ],
-
- 'link_settings': {
- 'libraries': [
- '-llog',
- '-landroid',
- '-lEGL',
- '-lGLESv2',
- '-lstdc++',
- '-latomic',
- '<@(nunicode_static_libs)',
- '<@(nunicode_ldflags)',
- '<@(sqlite_static_libs)',
- '<@(sqlite_ldflags)',
- '<@(zlib_static_libs)',
- '<@(zlib_ldflags)',
- '<@(libzip_static_libs)',
- '<@(libzip_ldflags)',
- '<@(libpng_static_libs)',
- '<@(libpng_ldflags)',
- '<@(libjpeg-turbo_static_libs)',
- '<@(libjpeg-turbo_ldflags)',
- '<@(geojson_static_libs)'
- ],
- },
- },
- {
- 'target_name': 'example-custom-layer-lib',
- 'product_name': 'example-custom-layer',
- 'type': 'shared_library',
- 'hard_dependency': 1,
-
- 'sources': [
- './src/example_custom_layer.cpp',
- ],
-
- 'include_dirs': [
- '../../include',
- ],
-
- 'link_settings': {
- 'libraries': [
- '-llog',
- '-landroid',
- '-lEGL',
- '-lGLESv2',
- '-lstdc++',
- '-latomic',
- ],
- },
- },
- {
- 'target_name': 'all',
- 'type': 'none',
- 'hard_dependency': 1,
-
- 'dependencies': [
- 'platform-lib',
- 'example-custom-layer-lib',
- ],
-
- 'variables': {
- 'pwd': '<!(pwd)',
- },
-
- 'copies': [
- {
- 'files': [
- '../../common/ca-bundle.crt',
- '../default/resources/api_mapbox_com-digicert.der',
- '../default/resources/api_mapbox_com-geotrust.der',
- '../default/resources/star_tilestream_net.der',
- ],
- 'destination': '<(DEPTH)/platform/android/MapboxGLAndroidSDK/src/main/assets'
- },
- ],
-
- 'actions': [
- {
- 'action_name': 'Strip mapbox library',
- 'inputs': [ '<(PRODUCT_DIR)/lib.target/libmapbox-gl.so' ],
- 'outputs': [ '<(DEPTH)/platform/android/MapboxGLAndroidSDK/src/main/jniLibs/$(JNIDIR)/libmapbox-gl.so' ],
- 'action': [ '$(STRIP)', '<@(_inputs)', '-o', '<@(_outputs)' ]
- },
- {
- 'action_name': 'Strip example custom layer library',
- 'inputs': [ '<(PRODUCT_DIR)/lib.target/libexample-custom-layer.so' ],
- 'outputs': [ '<(DEPTH)/platform/android//MapboxGLAndroidSDKTestApp/src/main/jniLibs/$(JNIDIR)/libexample-custom-layer.so' ],
- 'action': [ '$(STRIP)', '<@(_inputs)', '-o', '<@(_outputs)' ]
- }
- ],
- },
- ],
-}
diff --git a/platform/android/scripts/configure.sh b/platform/android/scripts/configure.sh
deleted file mode 100644
index 1c26108e11..0000000000
--- a/platform/android/scripts/configure.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-LIBPNG_VERSION=1.6.20
-LIBJPEG_TURBO_VERSION=1.4.2
-SQLITE_VERSION=3.9.1
-ZLIB_VERSION=system
-NUNICODE_VERSION=1.6
-LIBZIP_VERSION=0.11.2
-GEOMETRY_VERSION=0.8.0
-GEOJSON_VERSION=0.1.4
-GEOJSONVT_VERSION=6.1.2
-SUPERCLUSTER_VERSION=0.2.0
-KDBUSH_VERSION=0.1.1
-VARIANT_VERSION=1.1.0
-RAPIDJSON_VERSION=1.0.2
-JNI_HPP_VERSION=2.0.0
-EARCUT_VERSION=0.11
-
-export MASON_ANDROID_ABI=${MASON_PLATFORM_VERSION}