summaryrefslogtreecommitdiff
path: root/platform
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
parente3ee55b28d0b230d054c9718f79a1f6d685cd62b (diff)
downloadqtlocation-mapboxgl-692fe1f3ffc8f4364b39c14aa7d90cec2ff5c0a6.tar.gz
[build] switch to CMake
This is very much a work in progress.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/bitrise.yml2
-rw-r--r--platform/android/platform.gyp166
-rw-r--r--platform/android/scripts/configure.sh22
-rw-r--r--platform/ios/WorkspaceSettings.xcsettings10
-rw-r--r--platform/ios/bitrise.yml1
-rw-r--r--platform/ios/config.cmake60
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj88
-rw-r--r--platform/ios/ios.xcworkspace/contents.xcworkspacedata2
-rw-r--r--platform/ios/platform.gyp149
-rw-r--r--platform/ios/scripts/configure.sh17
-rwxr-xr-xplatform/ios/scripts/package.sh8
-rw-r--r--platform/ios/toolchain.cmake136
-rw-r--r--platform/linux/config.cmake105
-rwxr-xr-xplatform/linux/ninjabin0 -> 175240 bytes
-rw-r--r--platform/linux/platform.gyp125
-rw-r--r--platform/linux/scripts/configure.sh33
-rw-r--r--platform/macos/WorkspaceSettings.xcsettings10
-rw-r--r--platform/macos/bitrise.yml1
-rw-r--r--platform/macos/config.cmake113
-rw-r--r--platform/macos/macos.xcodeproj/project.pbxproj78
-rw-r--r--platform/macos/macos.xcworkspace/contents.xcworkspacedata2
-rw-r--r--platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-offline.xcscheme92
-rwxr-xr-xplatform/macos/ninjabin0 -> 171356 bytes
-rw-r--r--platform/macos/platform.gyp104
-rw-r--r--platform/macos/scripts/configure.sh21
-rwxr-xr-xplatform/macos/scripts/create_scheme.sh40
-rw-r--r--platform/macos/scripts/executable.xcscheme (renamed from platform/macos/macos.xcworkspace/xcshareddata/xcschemes/test.xcscheme)44
-rw-r--r--platform/macos/scripts/library.xcscheme (renamed from platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-render.xcscheme)48
-rw-r--r--platform/macos/scripts/macostest.xcscheme56
-rw-r--r--platform/macos/scripts/node.xcscheme (renamed from platform/node/scripts/node.xcscheme)26
-rwxr-xr-xplatform/macos/scripts/package.sh2
-rw-r--r--platform/node/bitrise.yml1
-rwxr-xr-xplatform/node/scripts/create_node_scheme.sh8
-rw-r--r--platform/qt/app/qmapboxgl.gypi58
-rw-r--r--platform/qt/bitrise-qt4.yml1
-rw-r--r--platform/qt/bitrise-qt5.yml1
-rw-r--r--platform/qt/platform.gyp237
-rw-r--r--platform/qt/qmlapp/qquickmapboxgl.gypi60
-rw-r--r--platform/qt/qt.gypi20
-rw-r--r--platform/qt/scripts/configure.sh92
40 files changed, 593 insertions, 1446 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}
diff --git a/platform/ios/WorkspaceSettings.xcsettings b/platform/ios/WorkspaceSettings.xcsettings
index a2d959210c..20a7accf01 100644
--- a/platform/ios/WorkspaceSettings.xcsettings
+++ b/platform/ios/WorkspaceSettings.xcsettings
@@ -3,11 +3,15 @@
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
- <string>UseAppPreferences</string>
+ <string>CustomLocation</string>
+ <key>CustomBuildIntermediatesPath</key>
+ <string>../../build/ios</string>
<key>CustomBuildLocationType</key>
- <string>RelativeToDerivedData</string>
+ <string>RelativeToWorkspace</string>
+ <key>CustomBuildProductsPath</key>
+ <string>../../build/ios</string>
<key>DerivedDataCustomLocation</key>
- <string>../../build</string>
+ <string>../../build/ios</string>
<key>DerivedDataLocationStyle</key>
<string>WorkspaceRelativePath</string>
<key>IssueFilterStyle</key>
diff --git a/platform/ios/bitrise.yml b/platform/ios/bitrise.yml
index 6e4771273f..f87a97b7d6 100644
--- a/platform/ios/bitrise.yml
+++ b/platform/ios/bitrise.yml
@@ -29,6 +29,7 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew install cmake
brew tap mapbox/homebrew-ios-sim-3
brew install mapbox/homebrew-ios-sim-3/ios-sim
gem install xcpretty --no-rdoc --no-ri
diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake
new file mode 100644
index 0000000000..28bef0cfeb
--- /dev/null
+++ b/platform/ios/config.cmake
@@ -0,0 +1,60 @@
+macro(mbgl_platform_core)
+ set_xcode_property(mbgl-core IPHONEOS_DEPLOYMENT_TARGET "8.0")
+ set_xcode_property(mbgl-core ENABLE_BITCODE "YES")
+ set_xcode_property(mbgl-core BITCODE_GENERATION_MODE bitcode)
+
+ target_sources(mbgl-core
+ # Loop
+ PRIVATE platform/darwin/src/async_task.cpp
+ PRIVATE platform/darwin/src/run_loop.cpp
+ PRIVATE platform/darwin/src/timer.cpp
+
+ # File source
+ PRIVATE platform/darwin/src/http_file_source.mm
+ PRIVATE platform/default/asset_file_source.cpp
+ PRIVATE platform/default/default_file_source.cpp
+ PRIVATE platform/default/online_file_source.cpp
+
+ # Offline
+ PRIVATE platform/default/mbgl/storage/offline.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.hpp
+ PRIVATE platform/default/mbgl/storage/offline_download.cpp
+ PRIVATE platform/default/mbgl/storage/offline_download.hpp
+ PRIVATE platform/default/sqlite3.cpp
+ PRIVATE platform/default/sqlite3.hpp
+
+ # Misc
+ PRIVATE platform/darwin/src/log_nslog.mm
+ PRIVATE platform/darwin/src/nsthread.mm
+ PRIVATE platform/darwin/src/reachability.m
+ PRIVATE platform/darwin/src/string_nsstring.mm
+
+ # Image handling
+ PRIVATE platform/darwin/src/image.mm
+
+ # Headless view
+ PRIVATE platform/darwin/src/headless_view_eagl.mm
+ PRIVATE platform/default/headless_display.cpp
+ PRIVATE platform/default/headless_view.cpp
+ )
+
+ target_compile_options(mbgl-core
+ PRIVATE -fobjc-arc
+ )
+
+ # TODO: Remove this by converting to ARC
+ set_source_files_properties(
+ platform/darwin/src/headless_view_eagl.mm
+ PROPERTIES
+ COMPILE_FLAGS -fno-objc-arc
+ )
+
+ target_include_directories(mbgl-core
+ PRIVATE platform/default
+ )
+
+ target_link_libraries(mbgl-core
+ PUBLIC -lz
+ )
+endmacro() \ No newline at end of file
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index bfd5a5e8a9..8fe54e7712 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -25,6 +25,7 @@
40EDA1C21CFE0E0500D9EA68 /* MGLAnnotationContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 40EDA1BE1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.m */; };
40FDA76B1CCAAA6800442548 /* MBXAnnotationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 40FDA76A1CCAAA6800442548 /* MBXAnnotationView.m */; };
554180421D2E97DE00012372 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554180411D2E97DE00012372 /* OpenGLES.framework */; };
+ 55D8C9961D0F18CE00F42F10 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 55D8C9951D0F18CE00F42F10 /* libsqlite3.tbd */; };
DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */; };
DA17BE301CC4BAC300402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
DA17BE311CC4BDAA00402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
@@ -156,7 +157,6 @@
DA88488B1CBB037E00AB86E3 /* SMCalloutView.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848891CBB037E00AB86E3 /* SMCalloutView.h */; };
DA88488C1CBB037E00AB86E3 /* SMCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488A1CBB037E00AB86E3 /* SMCalloutView.m */; };
DA88488E1CBB047F00AB86E3 /* reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = DA88488D1CBB047F00AB86E3 /* reachability.h */; };
- DA8848901CBB048E00AB86E3 /* reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488F1CBB048E00AB86E3 /* reachability.m */; };
DA8933A31CCC95B000E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89339F1CCC951200E68420 /* Localizable.strings */; };
DA8933BC1CCD2CA100E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933BA1CCD2CA100E68420 /* Foundation.strings */; };
DA8933BF1CCD2CAD00E68420 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DA8933BD1CCD2CAD00E68420 /* Foundation.stringsdict */; };
@@ -200,7 +200,6 @@
DAA4E4291CBB730400178DFB /* NSBundle+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848131CBAFA6200AB86E3 /* NSBundle+MGLAdditions.m */; };
DAA4E42A1CBB730400178DFB /* NSProcessInfo+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848161CBAFA6200AB86E3 /* NSProcessInfo+MGLAdditions.m */; };
DAA4E42B1CBB730400178DFB /* NSString+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848181CBAFA6200AB86E3 /* NSString+MGLAdditions.m */; };
- DAA4E42C1CBB730400178DFB /* reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488F1CBB048E00AB86E3 /* reachability.m */; };
DAA4E42D1CBB730400178DFB /* MGLAnnotationImage.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848411CBAFB9800AB86E3 /* MGLAnnotationImage.m */; };
DAA4E42E1CBB730400178DFB /* MGLAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848431CBAFB9800AB86E3 /* MGLAPIClient.m */; };
DAA4E42F1CBB730400178DFB /* MGLCompactCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8848451CBAFB9800AB86E3 /* MGLCompactCalloutView.m */; };
@@ -211,7 +210,6 @@
DAA4E4341CBB730400178DFB /* MGLUserLocationAnnotationView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88484E1CBAFB9800AB86E3 /* MGLUserLocationAnnotationView.m */; };
DAA4E4351CBB730400178DFB /* SMCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488A1CBB037E00AB86E3 /* SMCalloutView.m */; };
DAABF73D1CBC59BB005B1825 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAABF73B1CBC59BB005B1825 /* libmbgl-core.a */; };
- DAABF73E1CBC59BB005B1825 /* libmbgl-platform-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAABF73C1CBC59BB005B1825 /* libmbgl-platform-ios.a */; };
DABCABAC1CB80692000A7C39 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DABCABAB1CB80692000A7C39 /* main.m */; };
DABCABAF1CB80692000A7C39 /* MBXBenchAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DABCABAE1CB80692000A7C39 /* MBXBenchAppDelegate.m */; };
DABCABB21CB80692000A7C39 /* MBXBenchViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = DABCABB11CB80692000A7C39 /* MBXBenchViewController.mm */; };
@@ -349,6 +347,8 @@
40FDA7691CCAAA6800442548 /* MBXAnnotationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBXAnnotationView.h; sourceTree = "<group>"; };
40FDA76A1CCAAA6800442548 /* MBXAnnotationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBXAnnotationView.m; sourceTree = "<group>"; };
554180411D2E97DE00012372 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ 55D8C9941D0F133500F42F10 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = config.xcconfig; path = ../../build/ios/config.xcconfig; sourceTree = "<group>"; };
+ 55D8C9951D0F18CE00F42F10 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; };
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMapView_Internal.h; sourceTree = "<group>"; };
DA1DC94A1CB6C1C2006E619F /* Mapbox GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -495,7 +495,6 @@
DAA4E4061CBB5CBF00178DFB /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
DAA4E4131CBB71D400178DFB /* libMapbox.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMapbox.a; sourceTree = BUILT_PRODUCTS_DIR; };
DAABF73B1CBC59BB005B1825 /* libmbgl-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmbgl-core.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- DAABF73C1CBC59BB005B1825 /* libmbgl-platform-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmbgl-platform-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DABCABA81CB80692000A7C39 /* Bench GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Bench GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
DABCABAB1CB80692000A7C39 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
DABCABAD1CB80692000A7C39 /* MBXBenchAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXBenchAppDelegate.h; sourceTree = "<group>"; };
@@ -507,7 +506,6 @@
DABCABBB1CB80692000A7C39 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DABCABBF1CB80717000A7C39 /* locations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locations.cpp; sourceTree = "<group>"; };
DABCABC01CB80717000A7C39 /* locations.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = locations.hpp; sourceTree = "<group>"; };
- DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = mbgl.xcconfig; path = ../../build/ios/mbgl.xcconfig; sourceTree = "<group>"; };
DAC49C621CD07D74009E1AA3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
DAD165691CF41981001FF4B9 /* MGLFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFeature.h; sourceTree = "<group>"; };
DAD1656A1CF41981001FF4B9 /* MGLFeature_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFeature_Private.h; sourceTree = "<group>"; };
@@ -539,7 +537,7 @@
buildActionMask = 2147483647;
files = (
DAABF73D1CBC59BB005B1825 /* libmbgl-core.a in Frameworks */,
- DAABF73E1CBC59BB005B1825 /* libmbgl-platform-ios.a in Frameworks */,
+ 55D8C9961D0F18CE00F42F10 /* libsqlite3.tbd in Frameworks */,
DA27C24E1CBB3811000B0ECD /* GLKit.framework in Frameworks */,
DAA4E4051CBB5C9E00178DFB /* ImageIO.framework in Frameworks */,
DAA4E4071CBB5CBF00178DFB /* MobileCoreServices.framework in Frameworks */,
@@ -643,8 +641,8 @@
36F1153B1D46080700878E1A /* libmbgl-core.a */,
36F1153C1D46080700878E1A /* libmbgl-platform-ios.a */,
554180411D2E97DE00012372 /* OpenGLES.framework */,
+ 55D8C9951D0F18CE00F42F10 /* libsqlite3.tbd */,
DAABF73B1CBC59BB005B1825 /* libmbgl-core.a */,
- DAABF73C1CBC59BB005B1825 /* libmbgl-platform-ios.a */,
DAA4E4021CBB5C2F00178DFB /* CoreGraphics.framework */,
DA27C24D1CBB3811000B0ECD /* GLKit.framework */,
DAA4E4041CBB5C9E00178DFB /* ImageIO.framework */,
@@ -848,7 +846,7 @@
isa = PBXGroup;
children = (
DA35A2D11CCAB25200E826B2 /* jazzy.yml */,
- DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */,
+ 55D8C9941D0F133500F42F10 /* config.xcconfig */,
);
name = Configuration;
sourceTree = "<group>";
@@ -1399,7 +1397,6 @@
DA88488C1CBB037E00AB86E3 /* SMCalloutView.m in Sources */,
DA35A2B81CCA9A5D00E826B2 /* MGLClockDirectionFormatter.m in Sources */,
DAD1657A1CF4CDFF001FF4B9 /* MGLShapeCollection.m in Sources */,
- DA8848901CBB048E00AB86E3 /* reachability.m in Sources */,
DA8848211CBAFA6200AB86E3 /* MGLOfflinePack.mm in Sources */,
DA8848591CBAFB9800AB86E3 /* MGLMapView.mm in Sources */,
DA8848501CBAFB9800AB86E3 /* MGLAnnotationImage.m in Sources */,
@@ -1457,7 +1454,6 @@
DAA4E41E1CBB730400178DFB /* MGLMapCamera.mm in Sources */,
4018B1C81CDC287F00F666AF /* MGLAnnotationView.mm in Sources */,
DAA4E4341CBB730400178DFB /* MGLUserLocationAnnotationView.m in Sources */,
- DAA4E42C1CBB730400178DFB /* reachability.m in Sources */,
DAA4E4311CBB730400178DFB /* MGLMapboxEvents.m in Sources */,
DAA4E4231CBB730400178DFB /* MGLPolygon.mm in Sources */,
DAA4E42A1CBB730400178DFB /* NSProcessInfo+MGLAdditions.m in Sources */,
@@ -1703,9 +1699,9 @@
};
DA2E885A1CC036F400F24E7B /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
- HEADER_SEARCH_PATHS = ../../include;
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = test/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1722,9 +1718,9 @@
};
DA2E885B1CC036F400F24E7B /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
- HEADER_SEARCH_PATHS = ../../include;
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = test/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1741,7 +1737,7 @@
};
DA8847DB1CBAF91600AB86E3 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CURRENT_PROJECT_VERSION = 1;
@@ -1749,11 +1745,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
- );
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1767,12 +1759,7 @@
"$(geometry_cflags)",
"$(geojson_cflags)",
);
- OTHER_LDFLAGS = (
- "$(sqlite_ldflags)",
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
- );
+ OTHER_LDFLAGS = "$(mbgl_core_LINK_LIBRARIES)";
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
@@ -1783,7 +1770,7 @@
};
DA8847DC1CBAF91600AB86E3 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CURRENT_PROJECT_VERSION = 1;
@@ -1791,11 +1778,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
- );
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1809,12 +1792,7 @@
"$(geometry_cflags)",
"$(geojson_cflags)",
);
- OTHER_LDFLAGS = (
- "$(sqlite_ldflags)",
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
- );
+ OTHER_LDFLAGS = "$(mbgl_core_LINK_LIBRARIES)";
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
@@ -1847,18 +1825,10 @@
};
DAA4E41A1CBB71D500178DFB /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
- HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
- );
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/build/Debug-iphoneos",
- );
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"$(sqlite_cflags)",
@@ -1870,10 +1840,7 @@
);
OTHER_LDFLAGS = (
"-ObjC",
- "$(sqlite_ldflags)",
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
+ "$(mbgl_core_LINK_LIBRARIES)",
);
PRODUCT_NAME = Mapbox;
PUBLIC_HEADERS_FOLDER_PATH = Headers;
@@ -1883,18 +1850,10 @@
};
DAA4E41B1CBB71D500178DFB /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55D8C9941D0F133500F42F10 /* config.xcconfig */;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
- HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
- );
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/build/Debug-iphoneos",
- );
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"$(sqlite_cflags)",
@@ -1906,10 +1865,7 @@
);
OTHER_LDFLAGS = (
"-ObjC",
- "$(sqlite_ldflags)",
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
+ "$(mbgl_core_LINK_LIBRARIES)",
);
PRODUCT_NAME = Mapbox;
PUBLIC_HEADERS_FOLDER_PATH = Headers;
diff --git a/platform/ios/ios.xcworkspace/contents.xcworkspacedata b/platform/ios/ios.xcworkspace/contents.xcworkspacedata
index 929ade2fee..08503d2be1 100644
--- a/platform/ios/ios.xcworkspace/contents.xcworkspacedata
+++ b/platform/ios/ios.xcworkspace/contents.xcworkspacedata
@@ -11,6 +11,6 @@
location = "group:uitest/KIF/KIF.xcodeproj">
</FileRef>
<FileRef
- location = "group:../../build/ios/platform/ios/platform.xcodeproj">
+ location = "group:../../build/ios/mbgl.xcodeproj">
</FileRef>
</Workspace>
diff --git a/platform/ios/platform.gyp b/platform/ios/platform.gyp
deleted file mode 100644
index 4cb26091d4..0000000000
--- a/platform/ios/platform.gyp
+++ /dev/null
@@ -1,149 +0,0 @@
-{
- 'variables': {
- 'loop_lib': 'darwin',
- 'headless_lib': 'eagl',
- 'coverage': 0,
- },
- 'includes': [
- '../../build/ios/config.gypi',
- '../../mbgl.gypi',
- '../../test/test.gypi',
- ],
- 'target_defaults': {
- 'target_conditions': [
- ['_type == "static_library"', {
- 'xcode_settings': {
- 'SDKROOT': 'iphoneos',
- 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
- 'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
- 'TARGETED_DEVICE_FAMILY': '1,2',
- 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
- 'CODE_SIGN_IDENTITY': 'iPhone Developer',
- },
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'test',
- 'type': 'executable',
- 'product_name': 'ios-test',
- 'product_extension': 'app',
- 'mac_bundle': 1,
-
- 'dependencies': [
- 'test-lib',
- 'platform-lib',
- ],
-
- 'sources': [
- '../../test/src/main.mm',
-# '../../src/mbgl/util/premultiply.cpp',
- ],
-
- 'xcode_settings': {
- 'SDKROOT': 'iphoneos',
- 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
- 'INFOPLIST_FILE': '../../test/src/app-info.plist',
- 'IPHONEOS_DEPLOYMENT_TARGET': '8.0',
- 'TARGETED_DEVICE_FAMILY': '1,2',
- 'COPY_PHASE_STRIP': 'NO',
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- 'CLANG_ENABLE_MODULES': 'YES',
- 'CODE_SIGN_IDENTITY': 'iPhone Developer',
- 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGLUnitTest',
- },
-
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/$(WRAPPER_NAME)/test',
- 'files': [ '../../test/fixtures' ],
- }],
-
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
- '$(SDKROOT)/System/Library/Frameworks/GLKit.framework',
- '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
- '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
- '$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
- ],
- },
- },
- {
- 'target_name': 'platform-lib',
- 'product_name': 'mbgl-platform-ios',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'hard_dependency': 1,
- 'dependencies': [
- 'core',
- ],
-
- 'include_dirs': [
- 'include',
- '../darwin/include',
- '../default',
- '../../include',
- '../../src', # TODO: eliminate
- '<(SHARED_INTERMEDIATE_DIR)/include',
- ],
-
- 'sources': [
- '../default/asset_file_source.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',
- '../darwin/src/http_file_source.mm',
- '../darwin/src/log_nslog.mm',
- '../darwin/src/string_nsstring.mm',
- '../darwin/src/image.mm',
- '../darwin/src/nsthread.mm',
- '../darwin/src/reachability.m',
- ],
-
- 'variables': {
- 'cflags_cc': [
- '<@(sqlite_cflags)',
- '<@(zlib_cflags)',
- '<@(rapidjson_cflags)',
- ],
- 'ldflags': [
- '<@(sqlite_ldflags)',
- '<@(zlib_ldflags)',
- ],
- 'libraries': [
- '<@(sqlite_static_libs)',
- '<@(zlib_static_libs)',
- ],
- },
-
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- 'CLANG_ENABLE_MODULES': 'YES',
- },
-
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'BITCODE_GENERATION_MODE': 'bitcode',
- },
- },],
- ],
-
- 'link_settings': {
- 'libraries': [ '<@(libraries)' ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '<@(ldflags)' ],
- },
- },
- },
- ],
-}
diff --git a/platform/ios/scripts/configure.sh b/platform/ios/scripts/configure.sh
deleted file mode 100644
index 82599f0fe9..0000000000
--- a/platform/ios/scripts/configure.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-SQLITE_VERSION=system
-ZLIB_VERSION=system
-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
-GTEST_VERSION=1.7.0
-PIXELMATCH_VERSION=0.9.0
-EARCUT_VERSION=0.11
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index c012934203..b431bd689d 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -5,9 +5,9 @@ set -o pipefail
set -u
NAME=Mapbox
-OUTPUT=build/ios/pkg
+OUTPUT=platform/ios/pkg
DERIVED_DATA=build/ios
-PRODUCTS=${DERIVED_DATA}/Build/Products
+PRODUCTS=${DERIVED_DATA}
BUILDTYPE=${BUILDTYPE:-Debug}
BUILD_FOR_DEVICE=${BUILD_DEVICE:-true}
@@ -150,7 +150,7 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \
-create -output ${OUTPUT}/dynamic/${NAME}.framework/${NAME} | echo
fi
-
+
cp -rv ${PRODUCTS}/${BUILDTYPE}-iphoneos/Settings.bundle ${STATIC_SETTINGS_DIR}
else
if [[ ${BUILD_STATIC} == true ]]; then
@@ -175,7 +175,7 @@ else
${OUTPUT}/dynamic/
fi
fi
-
+
cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/Settings.bundle ${STATIC_SETTINGS_DIR}
fi
diff --git a/platform/ios/toolchain.cmake b/platform/ios/toolchain.cmake
new file mode 100644
index 0000000000..60dbac07c7
--- /dev/null
+++ b/platform/ios/toolchain.cmake
@@ -0,0 +1,136 @@
+# From https://github.com/OtherLevels/ios-cmake
+# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
+# files which are included with CMake 2.8.4
+# It has been altered for iOS development
+
+# Options:
+#
+# IOS_PLATFORM = OS (default) or SIMULATOR or SIMULATOR64
+# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders
+# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch.
+# SIMULATOR - used to build for the Simulator platforms, which have an x86 arch.
+#
+# CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder
+# By default this location is automatcially chosen based on the IOS_PLATFORM value above.
+# If set manually, it will override the default location and force the user of a particular Developer Platform
+#
+# CMAKE_IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder
+# By default this location is automatcially chosen based on the CMAKE_IOS_DEVELOPER_ROOT value.
+# In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path.
+# If set manually, this will force the use of a specific SDK version
+
+# Macros:
+#
+# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
+# A convenience macro for setting xcode specific properties on targets
+# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
+#
+# find_host_package (PROGRAM ARGS)
+# A macro used to find executable programs on the host system, not within the iOS environment.
+# Thanks to the android-cmake project for providing the command
+
+# Standard settings
+set (CMAKE_SYSTEM_NAME Darwin)
+set (CMAKE_SYSTEM_VERSION 1)
+set (UNIX True)
+set (APPLE True)
+set (IOS True)
+
+# Required as of cmake 2.8.10
+set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
+
+# Determine the cmake host system version so we know where to find the iOS SDKs
+find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
+if (CMAKE_UNAME)
+ exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
+ string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
+endif (CMAKE_UNAME)
+
+# Force the compilers to gcc for iOS
+include (CMakeForceCompiler)
+set(XCODE_TOOLCHAIN /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain)
+set(XCODE_BIN ${XCODE_TOOLCHAIN}/usr/bin)
+set(CMAKE_C_COMPILER ${XCODE_BIN}/clang)
+set(CMAKE_CXX_COMPILER ${XCODE_BIN}/clang++)
+set(CMAKE_FIND_ROOT_PATH ${XCODE_TOOLCHAIN_ROOT})
+set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
+
+# Skip the platform compiler checks for cross compiling
+set (CMAKE_CXX_COMPILER_WORKS TRUE)
+set (CMAKE_C_COMPILER_WORKS TRUE)
+
+# All iOS/Darwin specific settings - some may be redundant
+set (CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set (CMAKE_SHARED_MODULE_PREFIX "lib")
+set (CMAKE_SHARED_MODULE_SUFFIX ".so")
+set (CMAKE_MODULE_EXISTS 1)
+set (CMAKE_DL_LIBS "")
+
+set (CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
+set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
+set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+
+
+# This was required for Other C++ Flags to be set for enabling bitcode in a static lib.
+# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
+
+
+set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
+
+set (CMAKE_PLATFORM_HAS_INSTALLNAME 1)
+set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
+set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
+set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
+set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
+set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
+
+
+# Point to the latest SDK.
+set (CMAKE_OSX_SYSROOT "iphoneos" CACHE string "Sysroot used for iOS support")
+
+
+
+set (CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE string "Build architecture for iOS")
+
+# Set the find root to the iOS developer roots and to user defined paths
+set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root")
+
+# default to searching for frameworks first
+set (CMAKE_FIND_FRAMEWORK FIRST)
+
+# set up the default search directories for frameworks
+set (CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
+ ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
+ ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
+)
+
+# only search the iOS sdks, not the remainder of the host filesystem
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+
+# This little macro lets you set any XCode specific property
+macro (set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
+ set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
+endmacro (set_xcode_property)
+
+
+# This macro lets you find executable programs on the host system
+macro (find_host_package)
+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ set (IOS FALSE)
+
+ find_package(${ARGN})
+
+ set (IOS TRUE)
+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro (find_host_package)
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
new file mode 100644
index 0000000000..814a249849
--- /dev/null
+++ b/platform/linux/config.cmake
@@ -0,0 +1,105 @@
+mason_use(glfw 3.1.2)
+mason_use(boost_libprogram_options 1.60.0)
+mason_use(sqlite 3.9.1)
+mason_use(libuv 1.7.5)
+mason_use(nunicode 1.6)
+mason_use(libpng 1.6.20)
+mason_use(libjpeg-turbo 1.4.2)
+mason_use(webp 0.5.0)
+
+include(cmake/loop-uv.cmake)
+
+macro(mbgl_platform_core)
+ target_sources(mbgl-core
+ # File source
+ PRIVATE platform/default/asset_file_source.cpp
+ PRIVATE platform/default/default_file_source.cpp
+ PRIVATE platform/default/http_file_source.cpp
+ PRIVATE platform/default/online_file_source.cpp
+
+ # Offline
+ PRIVATE platform/default/mbgl/storage/offline.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.hpp
+ PRIVATE platform/default/mbgl/storage/offline_download.cpp
+ PRIVATE platform/default/mbgl/storage/offline_download.hpp
+ PRIVATE platform/default/sqlite3.cpp
+ PRIVATE platform/default/sqlite3.hpp
+
+ # Misc
+ PRIVATE platform/default/log_stderr.cpp
+ PRIVATE platform/default/string_stdlib.cpp
+ PRIVATE platform/default/thread.cpp
+
+ # Image handling
+ PRIVATE platform/default/image.cpp
+ PRIVATE platform/default/jpeg_reader.cpp
+ PRIVATE platform/default/png_reader.cpp
+ PRIVATE platform/default/webp_reader.cpp
+
+ # Headless view
+ PRIVATE platform/default/headless_display.cpp
+ PRIVATE platform/default/headless_view.cpp
+ PRIVATE platform/default/headless_view_glx.cpp
+ )
+
+ target_include_directories(mbgl-core
+ PRIVATE platform/default
+ )
+
+ target_add_mason_package(mbgl-core PUBLIC sqlite)
+ target_add_mason_package(mbgl-core PUBLIC nunicode)
+ target_add_mason_package(mbgl-core PUBLIC libpng)
+ target_add_mason_package(mbgl-core PUBLIC libjpeg-turbo)
+ target_add_mason_package(mbgl-core PUBLIC webp)
+
+ target_link_libraries(mbgl-core
+ PUBLIC -lz
+ PUBLIC -lcurl
+ PUBLIC -lGL
+ PUBLIC -lX11
+ )
+endmacro()
+
+
+macro(mbgl_platform_glfw)
+ target_link_libraries(mbgl-glfw
+ PRIVATE mbgl-loop
+ )
+endmacro()
+
+
+macro(mbgl_platform_render)
+ target_link_libraries(mbgl-render
+ PRIVATE mbgl-loop
+ )
+endmacro()
+
+
+macro(mbgl_platform_offline)
+ target_link_libraries(mbgl-offline
+ PRIVATE mbgl-loop
+ )
+endmacro()
+
+
+macro(mbgl_platform_test)
+ target_sources(mbgl-test
+ PRIVATE test/src/main.cpp
+ )
+
+ set_source_files_properties(
+ test/src/main.cpp
+ PROPERTIES
+ COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}"
+ )
+
+ target_link_libraries(mbgl-test
+ PRIVATE mbgl-loop
+ )
+endmacro()
+
+
+macro(mbgl_platform_node)
+ # Enabling node module by defining this macro
+endmacro()
diff --git a/platform/linux/ninja b/platform/linux/ninja
new file mode 100755
index 0000000000..189832fdb4
--- /dev/null
+++ b/platform/linux/ninja
Binary files differ
diff --git a/platform/linux/platform.gyp b/platform/linux/platform.gyp
deleted file mode 100644
index 7adf5337c4..0000000000
--- a/platform/linux/platform.gyp
+++ /dev/null
@@ -1,125 +0,0 @@
-{
- 'variables': {
- 'loop_lib': 'uv',
- 'headless_lib': 'glx',
- 'coverage': '<!(echo $ENABLE_COVERAGE)>',
- },
- 'conditions': [
- ['OS == "mac"', {
- 'variables': {
- 'headless_lib': 'cgl',
- }
- }],
- ],
- 'includes': [
- '../../mbgl.gypi',
- '../../test/test.gypi',
- '../../benchmark/benchmark.gypi',
- '../../bin/glfw.gypi',
- '../../bin/render.gypi',
- '../../bin/offline.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'test',
- 'type': 'executable',
-
- 'dependencies': [
- 'test-lib',
- 'platform-lib',
- 'copy_certificate_bundle',
- ],
-
- 'sources': [
- '../../test/src/main.cpp',
- ],
- },
- {
- 'target_name': 'benchmark',
- 'type': 'executable',
-
- 'dependencies': [
- 'benchmark-lib',
- 'platform-lib',
- ],
-
- 'sources': [
- '../../benchmark/src/main.cpp',
- ],
- },
- {
- 'target_name': 'platform-lib',
- 'product_name': 'mbgl-platform-linux',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'hard_dependency': 1,
- 'dependencies': [
- 'core',
- ],
-
- 'include_dirs': [
- '../default',
- '../../include',
- '../../src', # TODO: eliminate
- ],
-
- 'sources': [
- '../default/log_stderr.cpp',
- '../default/string_stdlib.cpp',
- '../default/thread.cpp',
- '../default/image.cpp',
- '../default/webp_reader.cpp',
- '../default/png_reader.cpp',
- '../default/jpeg_reader.cpp',
- '../default/asset_file_source.cpp',
- '../default/http_file_source.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)',
- '<@(nunicode_cflags)',
- '<@(sqlite_cflags)',
- '<@(rapidjson_cflags)',
- '<@(libcurl_cflags)',
- '<@(libpng_cflags)',
- '<@(libjpeg-turbo_cflags)',
- '<@(webp_cflags)',
- ],
-
- 'link_settings': {
- 'libraries': [
- '<@(nunicode_static_libs)',
- '<@(nunicode_ldflags)',
- '<@(sqlite_static_libs)',
- '<@(sqlite_ldflags)',
- '<@(zlib_static_libs)',
- '<@(zlib_ldflags)',
- '<@(libcurl_static_libs)',
- '<@(libcurl_ldflags)',
- '<@(libpng_static_libs)',
- '<@(libpng_ldflags)',
- '<@(libjpeg-turbo_static_libs)',
- '<@(libjpeg-turbo_ldflags)',
- '<@(webp_static_libs)',
- '<@(webp_ldflags)',
- ],
- },
-
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../include',
- ],
- },
- },
- ],
-}
diff --git a/platform/linux/scripts/configure.sh b/platform/linux/scripts/configure.sh
deleted file mode 100644
index 3d37994868..0000000000
--- a/platform/linux/scripts/configure.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env bash
-
-CXX11ABI=${CXX11ABI:-$(scripts/check-cxx11abi.sh)}
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-BOOST_LIBPROGRAM_OPTIONS_VERSION=1.60.0
-LIBCURL_VERSION=system
-GLFW_VERSION=3.1.2
-LIBPNG_VERSION=1.6.20
-LIBJPEG_TURBO_VERSION=1.4.2
-SQLITE_VERSION=3.9.1
-LIBUV_VERSION=1.7.5
-ZLIB_VERSION=system
-NUNICODE_VERSION=1.6
-GEOMETRY_VERSION=0.8.0
-GEOJSON_VERSION=0.1.4${CXX11ABI:-}
-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
-GTEST_VERSION=1.7.0${CXX11ABI:-}
-PIXELMATCH_VERSION=0.9.0
-WEBP_VERSION=0.5.0
-EARCUT_VERSION=0.11
-BENCHMARK_VERSION=1.0.0
-
-function print_opengl_flags {
- CONFIG+=" 'opengl_cflags%': $(quote_flags $(pkg-config gl x11 --cflags)),"$LN
- CONFIG+=" 'opengl_ldflags%': $(quote_flags $(pkg-config gl x11 --libs)),"$LN
-}
diff --git a/platform/macos/WorkspaceSettings.xcsettings b/platform/macos/WorkspaceSettings.xcsettings
index a2d959210c..88a45c15ce 100644
--- a/platform/macos/WorkspaceSettings.xcsettings
+++ b/platform/macos/WorkspaceSettings.xcsettings
@@ -3,11 +3,15 @@
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
- <string>UseAppPreferences</string>
+ <string>CustomLocation</string>
+ <key>CustomBuildIntermediatesPath</key>
+ <string>../../build/macos</string>
<key>CustomBuildLocationType</key>
- <string>RelativeToDerivedData</string>
+ <string>RelativeToWorkspace</string>
+ <key>CustomBuildProductsPath</key>
+ <string>../../build/macos</string>
<key>DerivedDataCustomLocation</key>
- <string>../../build</string>
+ <string>../../build/macos</string>
<key>DerivedDataLocationStyle</key>
<string>WorkspaceRelativePath</string>
<key>IssueFilterStyle</key>
diff --git a/platform/macos/bitrise.yml b/platform/macos/bitrise.yml
index ce622ef0f8..0987049437 100644
--- a/platform/macos/bitrise.yml
+++ b/platform/macos/bitrise.yml
@@ -29,6 +29,7 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew install cmake
gem install xcpretty --no-rdoc --no-ri
export BUILDTYPE=Debug
make macos
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
new file mode 100644
index 0000000000..fcb2c9a3e3
--- /dev/null
+++ b/platform/macos/config.cmake
@@ -0,0 +1,113 @@
+mason_use(glfw 3.1.2)
+mason_use(boost_libprogram_options 1.60.0)
+
+include(cmake/loop-darwin.cmake)
+
+macro(mbgl_platform_core)
+ target_sources(mbgl-core
+ # File source
+ PRIVATE platform/darwin/src/http_file_source.mm
+ PRIVATE platform/default/asset_file_source.cpp
+ PRIVATE platform/default/default_file_source.cpp
+ PRIVATE platform/default/online_file_source.cpp
+
+ # Offline
+ PRIVATE platform/default/mbgl/storage/offline.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.cpp
+ PRIVATE platform/default/mbgl/storage/offline_database.hpp
+ PRIVATE platform/default/mbgl/storage/offline_download.cpp
+ PRIVATE platform/default/mbgl/storage/offline_download.hpp
+ PRIVATE platform/default/sqlite3.cpp
+ PRIVATE platform/default/sqlite3.hpp
+
+ # Misc
+ PRIVATE platform/darwin/src/log_nslog.mm
+ PRIVATE platform/darwin/src/nsthread.mm
+ PRIVATE platform/darwin/src/reachability.m
+ PRIVATE platform/darwin/src/string_nsstring.mm
+
+ # Image handling
+ PRIVATE platform/darwin/src/image.mm
+
+ # Headless view
+ PRIVATE platform/darwin/src/headless_view_cgl.cpp
+ PRIVATE platform/default/headless_display.cpp
+ PRIVATE platform/default/headless_view.cpp
+ )
+
+ target_compile_options(mbgl-core
+ PRIVATE -fobjc-arc
+ )
+
+ target_include_directories(mbgl-core
+ PRIVATE platform/default
+ )
+
+ target_link_libraries(mbgl-core
+ PUBLIC -lz
+ )
+endmacro()
+
+
+macro(mbgl_platform_glfw)
+ target_link_libraries(mbgl-glfw
+ PRIVATE mbgl-loop
+ PRIVATE "-lsqlite3"
+ )
+endmacro()
+
+
+macro(mbgl_platform_render)
+ target_link_libraries(mbgl-render
+ PRIVATE mbgl-loop
+ PRIVATE "-framework Foundation"
+ PRIVATE "-framework CoreGraphics"
+ PRIVATE "-framework OpenGL"
+ PRIVATE "-framework ImageIO"
+ PRIVATE "-framework CoreServices"
+ PRIVATE "-lsqlite3"
+ )
+endmacro()
+
+
+macro(mbgl_platform_offline)
+ target_link_libraries(mbgl-offline
+ PRIVATE mbgl-loop
+ PRIVATE "-framework Foundation"
+ PRIVATE "-framework CoreGraphics"
+ PRIVATE "-framework OpenGL"
+ PRIVATE "-framework ImageIO"
+ PRIVATE "-framework CoreServices"
+ PRIVATE "-lsqlite3"
+ )
+endmacro()
+
+
+macro(mbgl_platform_test)
+ target_sources(mbgl-test
+ PRIVATE test/src/main.cpp
+ )
+
+ set_source_files_properties(
+ test/src/main.cpp
+ PROPERTIES
+ COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}"
+ )
+
+ target_link_libraries(mbgl-test
+ PRIVATE mbgl-loop
+ PRIVATE "-framework Foundation"
+ PRIVATE "-framework CoreGraphics"
+ PRIVATE "-framework OpenGL"
+ PRIVATE "-framework ImageIO"
+ PRIVATE "-framework CoreServices"
+ PRIVATE "-lsqlite3"
+ )
+endmacro()
+
+
+macro(mbgl_platform_node)
+ target_link_libraries(mbgl-node
+ PRIVATE "-framework Foundation"
+ )
+endmacro()
diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj
index ed980294a9..25af9015ac 100644
--- a/platform/macos/macos.xcodeproj/project.pbxproj
+++ b/platform/macos/macos.xcodeproj/project.pbxproj
@@ -8,6 +8,10 @@
/* Begin PBXBuildFile section */
52BECB0A1CC5A26F009CD791 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */; };
+ 5548BE781D09E718005DDE81 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
+ 5548BE7D1D0ACCD6005DDE81 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
+ 558F18221D0B13B100123F46 /* libmbgl-loop.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 558F18211D0B13B000123F46 /* libmbgl-loop.a */; };
+ 55D9B4B11D005D3900C1CCE2 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 55D9B4B01D005D3900C1CCE2 /* libz.tbd */; };
DA0CD58E1CF56F5800A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */; };
DA35A2A41CC9EB1A00E826B2 /* MGLCoordinateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA35A2A31CC9EB1A00E826B2 /* MGLCoordinateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA35A2A61CC9EB2700E826B2 /* MGLCoordinateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA35A2A51CC9EB2700E826B2 /* MGLCoordinateFormatter.m */; };
@@ -31,7 +35,6 @@
DA8933AE1CCD290700E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933AB1CCD290700E68420 /* Localizable.strings */; };
DA8933B51CCD2C2500E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B31CCD2C2500E68420 /* Foundation.strings */; };
DA8933B81CCD2C2D00E68420 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B61CCD2C2D00E68420 /* Foundation.stringsdict */; };
- DAB6924A1CC75A31005AAB54 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC2ABC41CC6D343006D18C4 /* MGLAnnotationImage_Private.h */; };
DACC22141CF3D3E200D220D9 /* MGLFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = DACC22121CF3D3E200D220D9 /* MGLFeature.h */; settings = {ATTRIBUTES = (Public, ); }; };
DACC22151CF3D3E200D220D9 /* MGLFeature.mm in Sources */ = {isa = PBXBuildFile; fileRef = DACC22131CF3D3E200D220D9 /* MGLFeature.mm */; };
@@ -46,8 +49,6 @@
DAE6C3321CC30DB200DB3429 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3281CC30DB200DB3429 /* Mapbox.framework */; };
DAE6C33D1CC30DB200DB3429 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3281CC30DB200DB3429 /* Mapbox.framework */; };
DAE6C33E1CC30DB200DB3429 /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3281CC30DB200DB3429 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- DAE6C3471CC31D1200DB3429 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
- DAE6C3481CC31D1200DB3429 /* libmbgl-platform-macos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3461CC31D1200DB3429 /* libmbgl-platform-macos.a */; };
DAE6C35A1CC31E0400DB3429 /* MGLAccountManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C34A1CC31E0400DB3429 /* MGLAccountManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
DAE6C35B1CC31E0400DB3429 /* MGLAnnotation.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C34B1CC31E0400DB3429 /* MGLAnnotation.h */; settings = {ATTRIBUTES = (Public, ); }; };
DAE6C35C1CC31E0400DB3429 /* MGLGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C34C1CC31E0400DB3429 /* MGLGeometry.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -148,6 +149,11 @@
/* Begin PBXFileReference section */
52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ 5548BE791D0ACBB2005DDE81 /* libmbgl-loop-darwin.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-loop-darwin.a"; path = "cmake/Debug/libmbgl-loop-darwin.a"; sourceTree = "<group>"; };
+ 5548BE7B1D0ACBBD005DDE81 /* libmbgl-loop-darwin.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-loop-darwin.a"; path = "cmake/Debug/libmbgl-loop-darwin.a"; sourceTree = "<group>"; };
+ 558F18211D0B13B000123F46 /* libmbgl-loop.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-loop.a"; path = "../../build/osx/Debug/libmbgl-loop.a"; sourceTree = "<group>"; };
+ 55D9B4B01D005D3900C1CCE2 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
+ 55FE0E8D1D100A0900FD240B /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = config.xcconfig; path = ../../build/macos/config.xcconfig; sourceTree = "<group>"; };
DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; };
DA35A2A31CC9EB1A00E826B2 /* MGLCoordinateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCoordinateFormatter.h; sourceTree = "<group>"; };
DA35A2A51CC9EB2700E826B2 /* MGLCoordinateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLCoordinateFormatter.m; sourceTree = "<group>"; };
@@ -255,7 +261,6 @@
DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = default_marker.pdf; sourceTree = "<group>"; };
DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = mapbox.pdf; sourceTree = "<group>"; };
DAE6C3C11CC31F4500DB3429 /* Mapbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mapbox.h; path = src/Mapbox.h; sourceTree = SOURCE_ROOT; };
- DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = mbgl.xcconfig; path = ../../build/macos/mbgl.xcconfig; sourceTree = "<group>"; };
DAE6C3C61CC3499100DB3429 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
DAE6C3C81CC34BD800DB3429 /* MGLGeometryTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLGeometryTests.mm; path = ../../darwin/test/MGLGeometryTests.mm; sourceTree = "<group>"; };
DAE6C3C91CC34BD800DB3429 /* MGLOfflinePackTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLOfflinePackTests.m; path = ../../darwin/test/MGLOfflinePackTests.m; sourceTree = "<group>"; };
@@ -278,9 +283,10 @@
buildActionMask = 2147483647;
files = (
52BECB0A1CC5A26F009CD791 /* SystemConfiguration.framework in Frameworks */,
- DAE6C3471CC31D1200DB3429 /* libmbgl-core.a in Frameworks */,
- DAE6C3481CC31D1200DB3429 /* libmbgl-platform-macos.a in Frameworks */,
+ 5548BE781D09E718005DDE81 /* libmbgl-core.a in Frameworks */,
+ 558F18221D0B13B100123F46 /* libmbgl-loop.a in Frameworks */,
DAE6C3C71CC3499100DB3429 /* libsqlite3.tbd in Frameworks */,
+ 55D9B4B11D005D3900C1CCE2 /* libz.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -288,8 +294,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- DAB6924A1CC75A31005AAB54 /* libmbgl-core.a in Frameworks */,
DAE6C3321CC30DB200DB3429 /* Mapbox.framework in Frameworks */,
+ 5548BE7D1D0ACCD6005DDE81 /* libmbgl-core.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -451,6 +457,10 @@
DAE6C31E1CC308BC00DB3429 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 558F18211D0B13B000123F46 /* libmbgl-loop.a */,
+ 5548BE7B1D0ACBBD005DDE81 /* libmbgl-loop-darwin.a */,
+ 5548BE791D0ACBB2005DDE81 /* libmbgl-loop-darwin.a */,
+ 55D9B4B01D005D3900C1CCE2 /* libz.tbd */,
52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */,
DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */,
DAE6C3461CC31D1200DB3429 /* libmbgl-platform-macos.a */,
@@ -538,7 +548,7 @@
DAE6C3C41CC31F7800DB3429 /* Configuration */ = {
isa = PBXGroup;
children = (
- DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */,
+ 55FE0E8D1D100A0900FD240B /* config.xcconfig */,
);
name = Configuration;
sourceTree = "<group>";
@@ -924,7 +934,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
+ SYMROOT = "$(PROJECT_DIR)/cmake";
};
name = Debug;
};
@@ -961,7 +971,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
+ SYMROOT = "$(PROJECT_DIR)/cmake";
};
name = Release;
};
@@ -1016,7 +1026,7 @@
};
DAE6C33F1CC30DB200DB3429 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55FE0E8D1D100A0900FD240B /* config.xcconfig */;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
@@ -1026,25 +1036,15 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
+ "$(mbgl_core_INCLUDE_DIRECTORIES)",
+ "$(mbgl_loop_INCLUDE_DIRECTORIES)",
);
INFOPLIST_FILE = "$(SRCROOT)/sdk/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "$(zlib_cflags)",
- "$(rapidjson_cflags)",
- "$(variant_cflags)",
- "$(geometry_cflags)",
- "$(geojson_cflags)",
- );
OTHER_LDFLAGS = (
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
+ "$(mbgl_core_LINK_LIBRARIES)",
+ "$(mbgl_loop_LINK_LIBRARIES)",
);
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
PRODUCT_NAME = Mapbox;
@@ -1056,7 +1056,7 @@
};
DAE6C3401CC30DB200DB3429 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55FE0E8D1D100A0900FD240B /* config.xcconfig */;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
@@ -1066,25 +1066,15 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = (
- ../default,
- ../../include,
- ../../src,
+ "$(mbgl_core_INCLUDE_DIRECTORIES)",
+ "$(mbgl_loop_INCLUDE_DIRECTORIES)",
);
INFOPLIST_FILE = "$(SRCROOT)/sdk/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "$(zlib_cflags)",
- "$(rapidjson_cflags)",
- "$(variant_cflags)",
- "$(geometry_cflags)",
- "$(geojson_cflags)",
- );
OTHER_LDFLAGS = (
- "$(zlib_ldflags)",
- "$(opengl_ldflags)",
- "$(geojson_static_libs)",
+ "$(mbgl_core_LINK_LIBRARIES)",
+ "$(mbgl_loop_LINK_LIBRARIES)",
);
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
PRODUCT_NAME = Mapbox;
@@ -1096,10 +1086,10 @@
};
DAE6C3411CC30DB200DB3429 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55FE0E8D1D100A0900FD240B /* config.xcconfig */;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
- HEADER_SEARCH_PATHS = ../../include;
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = test/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
OTHER_CPLUSPLUSFLAGS = (
@@ -1115,10 +1105,10 @@
};
DAE6C3421CC30DB200DB3429 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */;
+ baseConfigurationReference = 55FE0E8D1D100A0900FD240B /* config.xcconfig */;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
- HEADER_SEARCH_PATHS = ../../include;
+ HEADER_SEARCH_PATHS = "$(mbgl_core_INCLUDE_DIRECTORIES)";
INFOPLIST_FILE = test/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
OTHER_CPLUSPLUSFLAGS = (
diff --git a/platform/macos/macos.xcworkspace/contents.xcworkspacedata b/platform/macos/macos.xcworkspace/contents.xcworkspacedata
index 67a33490e9..65341f19fa 100644
--- a/platform/macos/macos.xcworkspace/contents.xcworkspacedata
+++ b/platform/macos/macos.xcworkspace/contents.xcworkspacedata
@@ -5,6 +5,6 @@
location = "container:macos.xcodeproj">
</FileRef>
<FileRef
- location = "group:../../build/macos/platform/macos/platform.xcodeproj">
+ location = "group:../../build/macos/mbgl.xcodeproj">
</FileRef>
</Workspace>
diff --git a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-offline.xcscheme b/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-offline.xcscheme
deleted file mode 100644
index 90ba9db153..0000000000
--- a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-offline.xcscheme
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0720"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "960D5BDFBD73C605ACCF58C2"
- BuildableName = "mbgl-offline"
- BlueprintName = "mbgl-offline"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
- <Testables>
- </Testables>
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "960D5BDFBD73C605ACCF58C2"
- BuildableName = "mbgl-offline"
- BlueprintName = "mbgl-offline"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <AdditionalOptions>
- </AdditionalOptions>
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "YES"
- customWorkingDirectory = "$(PROJECT_DIR)/../.."
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "960D5BDFBD73C605ACCF58C2"
- BuildableName = "mbgl-offline"
- BlueprintName = "mbgl-offline"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Release"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "960D5BDFBD73C605ACCF58C2"
- BuildableName = "mbgl-offline"
- BlueprintName = "mbgl-offline"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/platform/macos/ninja b/platform/macos/ninja
new file mode 100755
index 0000000000..64fcacc550
--- /dev/null
+++ b/platform/macos/ninja
Binary files differ
diff --git a/platform/macos/platform.gyp b/platform/macos/platform.gyp
deleted file mode 100644
index 68ab4ce467..0000000000
--- a/platform/macos/platform.gyp
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- 'variables': {
- 'loop_lib': 'darwin',
- 'headless_lib': 'cgl',
- 'coverage': 0,
- },
- 'includes': [
- '../../build/macos/config.gypi',
- '../../mbgl.gypi',
- '../../test/test.gypi',
- '../../benchmark/benchmark.gypi',
- '../../bin/glfw.gypi',
- '../../bin/render.gypi',
- '../../bin/offline.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'test',
- 'type': 'executable',
-
- 'dependencies': [
- 'test-lib',
- 'platform-lib',
- ],
-
- 'sources': [
- '../../test/src/main.cpp',
- ],
- },
- {
- 'target_name': 'benchmark',
- 'type': 'executable',
-
- 'dependencies': [
- 'benchmark-lib',
- 'platform-lib',
- ],
-
- 'sources': [
- '../../benchmark/src/main.cpp',
- ],
- },
- {
- 'target_name': 'platform-lib',
- 'product_name': 'mbgl-platform-macos',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'hard_dependency': 1,
- 'dependencies': [
- 'core',
- ],
-
- 'include_dirs': [
- 'include',
- '../darwin/include',
- '../default',
- '../../include',
- '../../src', # TODO: eliminate
- '<(SHARED_INTERMEDIATE_DIR)/include',
- ],
-
- 'sources': [
- '../default/asset_file_source.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',
- '../darwin/src/http_file_source.mm',
- '../darwin/src/log_nslog.mm',
- '../darwin/src/string_nsstring.mm',
- '../darwin/src/image.mm',
- '../darwin/src/nsthread.mm',
- '../darwin/src/reachability.m',
- ],
-
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [
- '<@(sqlite_cflags)',
- '<@(zlib_cflags)',
- '<@(rapidjson_cflags)',
- ],
- 'CLANG_ENABLE_OBJC_ARC': 'YES',
- 'CLANG_ENABLE_MODULES': 'YES',
- },
-
- 'link_settings': {
- 'libraries': [
- '<@(sqlite_static_libs)',
- '<@(zlib_static_libs)',
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '<@(zlib_ldflags)' ],
- },
- },
- },
- ],
-}
diff --git a/platform/macos/scripts/configure.sh b/platform/macos/scripts/configure.sh
deleted file mode 100644
index d408eef7e4..0000000000
--- a/platform/macos/scripts/configure.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-BOOST_LIBPROGRAM_OPTIONS_VERSION=1.60.0
-GLFW_VERSION=3.1.2
-SQLITE_VERSION=3.9.1
-ZLIB_VERSION=system
-NUNICODE_VERSION=1.6
-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
-GTEST_VERSION=1.7.0
-PIXELMATCH_VERSION=0.9.0
-EARCUT_VERSION=0.11
-BENCHMARK_VERSION=1.0.0
diff --git a/platform/macos/scripts/create_scheme.sh b/platform/macos/scripts/create_scheme.sh
new file mode 100755
index 0000000000..71f0e0855b
--- /dev/null
+++ b/platform/macos/scripts/create_scheme.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+set -u
+
+CONTAINER=build/macos/mbgl.xcodeproj
+OUTPUT="${CONTAINER}/xcshareddata/xcschemes/${SCHEME_NAME}.xcscheme"
+
+# Required ENV vars:
+# - SCHEME_TYPE: type of the scheme
+# - SCHEME_NAME: name of the scheme
+
+# Optional ENV vars:
+# - NODE_ARGUMENT (defaults to "")
+# - BUILDABLE_NAME (defaults ot SCHEME_NAME)
+# - BLUEPRINT_NAME (defaults ot SCHEME_NAME)
+
+
+# Try to reuse the existing Blueprint ID if the scheme already exists.
+if [ -f "${OUTPUT}" ]; then
+ BLUEPRINT_ID=$(sed -n "s/[ \t]*BlueprintIdentifier *= *\"\([A-Z0-9]\{24\}\)\"/\\1/p" "${OUTPUT}" | head -1)
+fi
+
+NODE_ARGUMENT=${NODE_ARGUMENT:-}
+MAPBOX_ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN:-}
+BLUEPRINT_ID=${BLUEPRINT_ID:-$(hexdump -n 12 -v -e '/1 "%02X"' /dev/urandom)}
+BUILDABLE_NAME=${BUILDABLE_NAME:-${SCHEME_NAME}}
+BLUEPRINT_NAME=${BLUEPRINT_NAME:-${SCHEME_NAME}}
+
+mkdir -p "${CONTAINER}/xcshareddata/xcschemes"
+
+sed "\
+s#{{BLUEPRINT_ID}}#${BLUEPRINT_ID}#;\
+s#{{BLUEPRINT_NAME}}#${BLUEPRINT_NAME}#;\
+s#{{BUILDABLE_NAME}}#${BUILDABLE_NAME}#;\
+s#{{CONTAINER}}#${CONTAINER}#;\
+s#{{MAPBOX_ACCESS_TOKEN}}#${MAPBOX_ACCESS_TOKEN}#;\
+s#{{WORKING_DIRECTORY}}#$(pwd)#;\
+s#{{NODE_PATH}}#$(dirname `which node`)#;\
+s#{{NODE_ARGUMENT}}#${NODE_ARGUMENT}#" \
+ platform/macos/scripts/${SCHEME_TYPE}.xcscheme > "${OUTPUT}"
diff --git a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/test.xcscheme b/platform/macos/scripts/executable.xcscheme
index bc8a3350f1..4353aad846 100644
--- a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/test.xcscheme
+++ b/platform/macos/scripts/executable.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0720"
+ LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "DC37A7F85AC5E5958672B4F8"
- BuildableName = "test"
- BlueprintName = "test"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -32,10 +32,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "DC37A7F85AC5E5958672B4F8"
- BuildableName = "test"
- BlueprintName = "test"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
@@ -46,8 +46,7 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
- useCustomWorkingDirectory = "YES"
- customWorkingDirectory = "$(PROJECT_DIR)/../.."
+ useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
@@ -56,10 +55,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "DC37A7F85AC5E5958672B4F8"
- BuildableName = "test"
- BlueprintName = "test"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
@@ -68,6 +67,13 @@
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "MAPBOX_ACCESS_TOKEN"
+ value = "{{MAPBOX_ACCESS_TOKEN}}"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@@ -81,10 +87,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "DC37A7F85AC5E5958672B4F8"
- BuildableName = "test"
- BlueprintName = "test"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
diff --git a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-render.xcscheme b/platform/macos/scripts/library.xcscheme
index c176861999..012bc900c2 100644
--- a/platform/macos/macos.xcworkspace/xcshareddata/xcschemes/mbgl-render.xcscheme
+++ b/platform/macos/scripts/library.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0720"
+ LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "D27AE71B9B193AD277AD4CFE"
- BuildableName = "mbgl-render"
- BlueprintName = "mbgl-render"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -29,15 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D27AE71B9B193AD277AD4CFE"
- BuildableName = "mbgl-render"
- BlueprintName = "mbgl-render"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
@@ -46,22 +37,20 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
- useCustomWorkingDirectory = "YES"
- customWorkingDirectory = "$(PROJECT_DIR)/../.."
+ useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
+ <MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "D27AE71B9B193AD277AD4CFE"
- BuildableName = "mbgl-render"
- BlueprintName = "mbgl-render"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
- </BuildableProductRunnable>
+ </MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@@ -71,16 +60,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
+ <MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "D27AE71B9B193AD277AD4CFE"
- BuildableName = "mbgl-render"
- BlueprintName = "mbgl-render"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
- </BuildableProductRunnable>
+ </MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
diff --git a/platform/macos/scripts/macostest.xcscheme b/platform/macos/scripts/macostest.xcscheme
deleted file mode 100644
index ba6f6a6f4b..0000000000
--- a/platform/macos/scripts/macostest.xcscheme
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0720"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
- <Testables>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "6EE19CDFBCE7BD04FE561812"
- BuildableName = "macostest.xctest"
- BlueprintName = "macostest"
- ReferencedContainer = "container:../../build/macos/platform/macos/platform.xcodeproj">
- </BuildableReference>
- </TestableReference>
- </Testables>
- <AdditionalOptions>
- </AdditionalOptions>
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Release"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/platform/node/scripts/node.xcscheme b/platform/macos/scripts/node.xcscheme
index 52a89fb81f..361ed58a37 100644
--- a/platform/node/scripts/node.xcscheme
+++ b/platform/macos/scripts/node.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0700"
+ LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
- BuildableName = "action_after_build"
- BlueprintName = "action_after_build"
- ReferencedContainer = "container:build/binding.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -50,10 +50,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
- BuildableName = "action_after_build"
- BlueprintName = "action_after_build"
- ReferencedContainer = "container:build/binding.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
@@ -81,10 +81,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
- BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
- BuildableName = "action_after_build"
- BlueprintName = "action_after_build"
- ReferencedContainer = "container:build/binding.xcodeproj">
+ BlueprintIdentifier = "{{BLUEPRINT_ID}}"
+ BuildableName = "{{BUILDABLE_NAME}}"
+ BlueprintName = "{{BLUEPRINT_NAME}}"
+ ReferencedContainer = "container:{{CONTAINER}}">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
diff --git a/platform/macos/scripts/package.sh b/platform/macos/scripts/package.sh
index c2a015b346..603ecd179c 100755
--- a/platform/macos/scripts/package.sh
+++ b/platform/macos/scripts/package.sh
@@ -7,7 +7,7 @@ set -u
NAME=Mapbox
OUTPUT=build/macos/pkg
DERIVED_DATA=build/macos
-PRODUCTS=${DERIVED_DATA}/Build/Products
+PRODUCTS=${DERIVED_DATA}
BUILDTYPE=${BUILDTYPE:-Release}
GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES}
diff --git a/platform/node/bitrise.yml b/platform/node/bitrise.yml
index b43b85d69a..b968554781 100644
--- a/platform/node/bitrise.yml
+++ b/platform/node/bitrise.yml
@@ -29,6 +29,7 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew install cmake
brew unlink node
brew install awscli homebrew/versions/node4-lts
brew link homebrew/versions/node4-lts
diff --git a/platform/node/scripts/create_node_scheme.sh b/platform/node/scripts/create_node_scheme.sh
deleted file mode 100755
index 5b97918aea..0000000000
--- a/platform/node/scripts/create_node_scheme.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-NAME=$1
-shift
-CMD=$@
-DIR="build/binding.xcodeproj/xcshareddata/xcschemes"
-mkdir -p "${DIR}"
-
-sed "s#{{NODE_PATH}}#$(dirname `which node`)#;s#{{BLUEPRINT_IDENTIFIER}}#$(hexdump -n 12 -v -e '/1 "%02X"' /dev/urandom)#;s#{{WORKING_DIRECTORY}}#$(pwd)#;s#{{NODE_ARGUMENT}}#${CMD}#" platform/node/scripts/node.xcscheme > "${DIR}/${NAME}.xcscheme"
diff --git a/platform/qt/app/qmapboxgl.gypi b/platform/qt/app/qmapboxgl.gypi
deleted file mode 100644
index 22b4e1281e..0000000000
--- a/platform/qt/app/qmapboxgl.gypi
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'qt-app',
- 'product_name': 'qmapboxgl',
- 'type': 'executable',
-
- 'includes': [
- '../qt.gypi',
- ],
-
- 'dependencies': [
- 'qt-lib',
- ],
-
- 'sources': [
- 'main.cpp',
- 'mapwindow.cpp',
- 'mapwindow.hpp',
- 'source.qrc',
- ],
-
- 'include_dirs': [
- '../include',
- ],
-
- 'variables': {
- 'cflags': [
- '<@(opengl_cflags)',
- '<@(qt_core_cflags)',
- '<@(qt_gui_cflags)',
- '<@(qt_opengl_cflags)',
- '-fPIC',
- # Qt4 generates code with unused variables.
- '-Wno-unused-variable',
- ],
- 'ldflags': [
- '<@(opengl_ldflags)',
- '<@(qt_core_ldflags)',
- '<@(qt_gui_ldflags)',
- '<@(qt_opengl_ldflags)',
- ],
- },
-
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ],
- 'OTHER_LDFLAGS': [ '<@(ldflags)' ],
- },
- }, {
- 'cflags_cc': [ '<@(cflags)' ],
- 'libraries': [ '<@(ldflags)' ],
- }],
- ],
- },
- ],
-}
diff --git a/platform/qt/bitrise-qt4.yml b/platform/qt/bitrise-qt4.yml
index aeff150ee7..baa58a0308 100644
--- a/platform/qt/bitrise-qt4.yml
+++ b/platform/qt/bitrise-qt4.yml
@@ -29,6 +29,7 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew install cmake
brew install qt
brew link qt
brew linkapps qt
diff --git a/platform/qt/bitrise-qt5.yml b/platform/qt/bitrise-qt5.yml
index a612263e48..9c60e45119 100644
--- a/platform/qt/bitrise-qt5.yml
+++ b/platform/qt/bitrise-qt5.yml
@@ -29,6 +29,7 @@ workflows:
- content: |-
#!/bin/bash
set -eu -o pipefail
+ brew install cmake
brew install qt5
brew link qt5 --force
brew linkapps qt5
diff --git a/platform/qt/platform.gyp b/platform/qt/platform.gyp
deleted file mode 100644
index cb46aab07e..0000000000
--- a/platform/qt/platform.gyp
+++ /dev/null
@@ -1,237 +0,0 @@
-{
- 'variables': {
- 'loop_lib': 'qt',
- 'conditions': [
- ['OS == "mac"', {
- 'headless_lib': 'cgl',
- }, {
- 'headless_lib': 'glx',
- }]
- ],
- 'qtlibversion': '1.0.0',
- 'coverage': 0,
- },
- 'conditions': [
- ['<(qt_version_major) == 5', {
- 'includes': [ 'qmlapp/qquickmapboxgl.gypi' ],
- }],
- ],
- 'includes': [
- 'app/qmapboxgl.gypi',
- '../../mbgl.gypi',
- '../../test/test.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'platform-lib',
- 'product_name': 'mbgl-platform-qt',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'hard_dependency': 1,
-
- 'dependencies': [
- 'core',
- ],
-
- 'includes': [
- 'qt.gypi',
- ],
-
- 'sources': [
- '../default/asset_file_source.cpp',
- '../default/default_file_source.cpp',
- '../default/log_stderr.cpp',
- '../default/mbgl/storage/offline.cpp',
- '../default/mbgl/storage/offline_database.cpp',
- '../default/mbgl/storage/offline_download.cpp',
- '../default/online_file_source.cpp',
- '../default/sqlite3.cpp',
- 'include/qmapbox.hpp',
- 'include/qmapboxgl.hpp',
- 'include/qquickmapboxgl.hpp',
- 'include/qquickmapboxglstyleproperty.hpp',
- 'qmapbox.qrc',
- 'src/async_task.cpp',
- 'src/async_task_impl.hpp',
- 'src/http_file_source.cpp',
- 'src/http_file_source.hpp',
- 'src/http_request.cpp',
- 'src/http_request.hpp',
- 'src/image.cpp',
- 'src/qmapbox.cpp',
- 'src/qmapboxgl.cpp',
- 'src/qmapboxgl_p.hpp',
- 'src/qquickmapboxgl.cpp',
- 'src/qquickmapboxglstyleproperty.cpp',
- 'src/qquickmapboxglrenderer.cpp',
- 'src/qquickmapboxglrenderer.hpp',
- 'src/run_loop.cpp',
- 'src/run_loop_impl.hpp',
- 'src/string_stdlib.cpp',
- 'src/timer.cpp',
- 'src/timer_impl.hpp',
- ],
-
- 'variables': {
- 'cflags': [
- '<@(boost_cflags)',
- '<@(geojson_cflags)',
- '<@(libjpeg-turbo_cflags)',
- '<@(nunicode_cflags)',
- '<@(opengl_cflags)',
- '<@(qt_core_cflags)',
- '<@(qt_gui_cflags)',
- '<@(qt_network_cflags)',
- '<@(rapidjson_cflags)',
- '<@(sqlite_cflags)',
- '-fPIC',
- ],
- 'ldflags': [
- '<@(nunicode_ldflags)',
- '<@(opengl_ldflags)',
- '<@(qt_core_ldflags)',
- '<@(qt_gui_ldflags)',
- '<@(qt_network_ldflags)',
- '<@(sqlite_ldflags)',
- '<@(zlib_ldflags)',
- ],
- 'libraries': [
- '<@(geojson_static_libs)',
- '<@(libjpeg-turbo_static_libs)',
- '<@(nunicode_static_libs)',
- '<@(sqlite_static_libs)',
- '<@(zlib_static_libs)',
- ],
- },
-
- 'include_dirs': [
- 'include',
- '../default',
- '../../include',
- '../../src', # TODO: eliminate
- ],
-
- 'conditions': [
- ['<(qt_image_decoders) == 0', {
- 'sources': [
- '../default/jpeg_reader.cpp',
- '../default/webp_reader.cpp',
- ],
- 'variables': {
- 'cflags': [
- '<@(libjpeg-turbo_cflags)',
- '<@(webp_cflags)',
- ],
- 'ldflags': [
- '<@(libjpeg-turbo_ldflags)',
- '<@(webp_ldflags)',
- ],
- 'libraries': [
- '<@(libjpeg-turbo_static_libs)',
- '<@(webp_static_libs)',
- ],
- },
- }, {
- 'variables': {
- 'cflags': [
- '-DQT_IMAGE_DECODERS',
- ],
- },
- }],
- ['<(qt_version_major) == 4', {
- 'variables': {
- 'cflags': [
- '<@(qt_opengl_cflags)',
- # Qt4 generates code with unused variables.
- '-Wno-unused-variable',
- ],
- 'ldflags': [
- '<@(qt_opengl_ldflags)',
- ],
- },
- }],
- ['<(qt_version_major) == 5', {
- 'variables': {
- 'cflags': [
- '<@(qt_location_cflags)',
- '<@(qt_positioning_cflags)',
- '<@(qt_quick_cflags)',
- ],
- 'ldflags': [
- '<@(qt_location_ldflags)',
- '<@(qt_positioning_ldflags)',
- '<@(qt_quick_ldflags)',
- ],
- },
- }, {
- 'sources/': [ [ 'exclude', 'qquick*' ] ],
- }],
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ],
- },
- 'sources': [
- '../darwin/src/nsthread.mm',
- ],
- }, {
- 'cflags_cc': [ '<@(cflags)' ],
- 'sources': [
- '../default/thread.cpp',
- ],
- }]
- ],
-
- 'link_settings': {
- 'conditions': [
- ['OS == "mac"', {
- 'libraries': [
- '<@(libraries)',
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- ],
- 'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] }
- }, {
- 'libraries': [ '<@(libraries)', '<@(ldflags)' ],
- }]
- ],
- },
- },
- {
- 'target_name': 'qt-lib',
- 'product_name': 'qmapboxgl',
- 'type': 'shared_library',
- 'product_extension': 'so.<(qtlibversion)',
-
- 'includes': [
- 'qt.gypi',
- ],
-
- 'dependencies': [
- 'platform-lib',
- ],
-
- 'link_settings': {
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [ '-all_load' ],
- 'LD_DYLIB_INSTALL_NAME': '@executable_path/libqmapboxgl.so.<(qtlibversion)',
- }
- }]
- ],
- },
- },
- {
- 'target_name': 'test',
- 'type': 'executable',
-
- 'dependencies': [
- 'test-lib',
- 'platform-lib',
- ],
-
- 'sources': [
- '../../test/src/main.cpp',
- ],
- },
- ],
-}
diff --git a/platform/qt/qmlapp/qquickmapboxgl.gypi b/platform/qt/qmlapp/qquickmapboxgl.gypi
deleted file mode 100644
index 7b539a52f2..0000000000
--- a/platform/qt/qmlapp/qquickmapboxgl.gypi
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'qt-qml-app',
- 'product_name': 'qquickmapboxgl',
- 'type': 'executable',
-
- 'includes': [
- '../qt.gypi',
- ],
-
- 'dependencies': [
- 'qt-lib',
- ],
-
- 'sources': [
- 'main.cpp',
- 'qml.qrc',
- ],
-
- 'include_dirs': [
- '../include',
- ],
-
- 'variables': {
- 'cflags': [
- '<@(opengl_cflags)',
- '<@(qt_core_cflags)',
- '<@(qt_gui_cflags)',
- '<@(qt_location_cflags)',
- '<@(qt_positioning_cflags)',
- '<@(qt_qml_cflags)',
- '<@(qt_quick_cflags)',
- '-fPIC',
- ],
- 'ldflags': [
- '<@(opengl_ldflags)',
- '<@(qt_core_ldflags)',
- '<@(qt_gui_ldflags)',
- '<@(qt_location_ldflags)',
- '<@(qt_positioning_ldflags)',
- '<@(qt_qml_ldflags)',
- '<@(qt_quick_ldflags)',
- ],
- },
-
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ],
- 'OTHER_LDFLAGS': [ '<@(ldflags)' ],
- },
- }, {
- 'cflags_cc': [ '<@(cflags)' ],
- 'libraries': [ '<@(ldflags)' ],
- }],
- ],
- },
- ],
-}
diff --git a/platform/qt/qt.gypi b/platform/qt/qt.gypi
deleted file mode 100644
index e98b3254b0..0000000000
--- a/platform/qt/qt.gypi
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- 'rules': [
- {
- 'rule_name': 'MOC files',
- 'extension': 'hpp',
- 'process_outputs_as_sources': 1,
- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cpp' ],
- 'action': [ '<(qt_moc)', '<(RULE_INPUT_PATH)', '-o', '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cpp' ],
- 'message': 'Generating MOC <(RULE_INPUT_ROOT).cpp',
- },
- {
- 'rule_name': 'QRC files',
- 'extension': 'qrc',
- 'process_outputs_as_sources': 1,
- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/qrc_<(RULE_INPUT_ROOT).cpp' ],
- 'action': [ '<(qt_rcc)', '<(RULE_INPUT_PATH)', '-name', '<(RULE_INPUT_ROOT)', '-o', '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/qrc_<(RULE_INPUT_ROOT).cpp' ],
- 'message': 'Generating QRC <(RULE_INPUT_ROOT).cpp',
- },
- ],
-}
diff --git a/platform/qt/scripts/configure.sh b/platform/qt/scripts/configure.sh
deleted file mode 100644
index 23f4b0bf52..0000000000
--- a/platform/qt/scripts/configure.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env bash
-
-CXX11ABI=${CXX11ABI:-$(scripts/check-cxx11abi.sh)}
-
-UNIQUE_RESOURCE_VERSION=dev
-PROTOZERO_VERSION=1.3.0
-BOOST_VERSION=1.60.0
-GEOMETRY_VERSION=0.8.0
-GEOJSON_VERSION=0.1.4${CXX11ABI:-}
-GEOJSONVT_VERSION=6.1.2
-SUPERCLUSTER_VERSION=0.2.0
-KDBUSH_VERSION=0.1.1
-GTEST_VERSION=1.7.0${CXX11ABI:-}
-LIBJPEG_TURBO_VERSION=1.4.2
-PIXELMATCH_VERSION=0.9.0
-RAPIDJSON_VERSION=1.0.2
-SQLITE_VERSION=3.9.1
-VARIANT_VERSION=1.1.0
-ZLIB_VERSION=system
-WEBP_VERSION=0.5.0
-EARCUT_VERSION=0.11
-
-function print_default_flags {
- CONFIG+=" 'cflags': $(quote_flags -fvisibility=hidden -D__QT__),"$LN
-}
-
-if [ "$MASON_PLATFORM" == "osx" ]; then
- # XXX: Argh, adding the __QT__ flag here because GYP for OSX does
- # not respect the `cflags` variable above and we need it to reach
- # the utests somehow. Gonna be fixed properly when we move to CMake.
- function print_opengl_flags {
- CONFIG+=" 'opengl_cflags%': ['-D__QT__'],"$LN
- CONFIG+=" 'opengl_ldflags%': ['-framework OpenGL', '-framework CoreFoundation'],"$LN
- }
-else
- function print_opengl_flags {
- CONFIG+=" 'opengl_cflags%': $(quote_flags $(pkg-config gl x11 --cflags)),"$LN
- CONFIG+=" 'opengl_ldflags%': $(quote_flags $(pkg-config gl x11 --libs)),"$LN
- }
-fi
-
-function print_qt_flags {
- mason install Qt system
-
- QMAKE="qmake"
- if [ ! $(which ${QMAKE} 2>/dev/null) ]; then
- QMAKE="qmake-qt5"
- fi
-
- QT_VERSION_MAJOR=$(${QMAKE} -query QT_VERSION | cut -d. -f1)
- CONFIG+=" 'qt_version_major%': ['${QT_VERSION_MAJOR}'],"$LN
- CONFIG+=" 'qt_image_decoders%': [0],"$LN
-
- CONFIG+=" 'qt_core_cflags%': $(quote_flags $(mason cflags Qt system "QtCore")),"$LN
- CONFIG+=" 'qt_gui_cflags%': $(quote_flags $(mason cflags Qt system "QtGui")),"$LN
- CONFIG+=" 'qt_opengl_cflags%': $(quote_flags $(mason cflags Qt system "QtOpenGL")),"$LN
- CONFIG+=" 'qt_network_cflags%': $(quote_flags $(mason cflags Qt system "QtNetwork")),"$LN
-
- CONFIG+=" 'qt_core_ldflags%': $(quote_flags $(mason ldflags Qt system "QtCore")),"$LN
- CONFIG+=" 'qt_gui_ldflags%': $(quote_flags $(mason ldflags Qt system "QtGui")),"$LN
- CONFIG+=" 'qt_opengl_ldflags%': $(quote_flags $(mason ldflags Qt system "QtOpenGL")),"$LN
- CONFIG+=" 'qt_network_ldflags%': $(quote_flags $(mason ldflags Qt system "QtNetwork")),"$LN
-
- if [ ${QT_VERSION_MAJOR} -gt 4 ]; then
- CONFIG+=" 'qt_location_cflags%': $(quote_flags $(mason cflags Qt system "QtLocation")),"$LN
- CONFIG+=" 'qt_qml_cflags%': $(quote_flags $(mason cflags Qt system "QtQml")), "$LN
- CONFIG+=" 'qt_quick_cflags%': $(quote_flags $(mason cflags Qt system "QtQuick")), "$LN
- CONFIG+=" 'qt_positioning_cflags%': $(quote_flags $(mason cflags Qt system "QtPositioning")),"$LN
-
- CONFIG+=" 'qt_location_ldflags%': $(quote_flags $(mason ldflags Qt system "QtLocation")),"$LN
- CONFIG+=" 'qt_qml_ldflags%': $(quote_flags $(mason ldflags Qt system "QtQml")), "$LN
- CONFIG+=" 'qt_quick_ldflags%': $(quote_flags $(mason ldflags Qt system "QtQuick")), "$LN
- CONFIG+=" 'qt_positioning_ldflags%': $(quote_flags $(mason ldflags Qt system "QtPositioning")),"$LN
- fi
-
- if hash moc 2>/dev/null && hash rcc 2>/dev/null; then
- CONFIG+=" 'qt_moc%': '$(which moc)',"$LN
- CONFIG+=" 'qt_rcc%': '$(which rcc)',"$LN
- elif [ ${QT_VERSION_MAJOR} -gt 4 ] ; then
- CONFIG+=" 'qt_moc%': '$(pkg-config Qt${QT_VERSION_MAJOR}Core --variable=host_bins)/moc',"$LN
- CONFIG+=" 'qt_rcc%': '$(pkg-config Qt${QT_VERSION_MAJOR}Core --variable=host_bins)/rcc',"$LN
- else
- CONFIG+=" 'qt_moc%': '$(pkg-config QtCore --variable=moc_location)',"$LN
- CONFIG+=" 'qt_rcc%': '$(pkg-config QtCore --variable=rcc_location)',"$LN
- fi
-}
-
-CONFIGURE_SUPLATFORM=platform/qt/scripts/configure-${MASON_PLATFORM_VERSION}.sh
-
-if [ -f $CONFIGURE_SUPLATFORM ]; then
- source $CONFIGURE_SUPLATFORM
-fi