summaryrefslogtreecommitdiff
path: root/gyp
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-12-03 16:03:00 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-22 14:45:56 -0800
commit9350d3f78cee508f98bbae8d31a3a47007cb0322 (patch)
tree43d9d71c670b4a900727dcd56b59b85860b66401 /gyp
parentded8b62c916b2ad1782486ed9d1fe5049a82c512 (diff)
downloadqtlocation-mapboxgl-9350d3f78cee508f98bbae8d31a3a47007cb0322.tar.gz
[ios] Converted iOS SDK into dynamic framework
make iproj now produces a target that pulls together static libraries like core and platform-ios into a real dynamic framework. iosapp is pretty much just a regular iOS application that links Mapbox.framework (except for the inclusion of default_styles.hpp). iosapp runs fine in the Simulator and on a device, and the same is true for any application linking against Mapbox.framework. The ipackage target produces both a Bitcode-disabled static framework and a Bitcode-enabled dynamic framework, eliminating the need for a separate framework.sh. It disables code signing, since that happens on copy when the framework is embedded inside the application bundle. It also merges the device and simulator builds into a single fat framework. Also bumped itest minimum deployment target to iOS 8.0, the first version that supports linking frameworks. Fixes #828.
Diffstat (limited to 'gyp')
-rw-r--r--gyp/ios.gyp1
-rw-r--r--gyp/platform-ios.gypi51
2 files changed, 18 insertions, 34 deletions
diff --git a/gyp/ios.gyp b/gyp/ios.gyp
index f26ec3772c..e015318c45 100644
--- a/gyp/ios.gyp
+++ b/gyp/ios.gyp
@@ -1,6 +1,7 @@
{
'includes': [
'../ios/app/mapboxgl-app.gypi',
+ '../ios/framework/framework-ios.gypi',
'../ios/benchmark/benchmark-ios.gypi',
],
}
diff --git a/gyp/platform-ios.gypi b/gyp/platform-ios.gypi
index 0c24663749..aab82387ed 100644
--- a/gyp/platform-ios.gypi
+++ b/gyp/platform-ios.gypi
@@ -1,6 +1,7 @@
{
'targets': [
- { 'target_name': 'platform-ios',
+ {
+ 'target_name': 'platform-ios',
'product_name': 'mbgl-platform-ios',
'type': 'static_library',
'standalone_static_library': 1,
@@ -27,51 +28,31 @@
'../platform/darwin/NSException+MGLAdditions.h',
'../platform/darwin/NSString+MGLAdditions.h',
'../platform/darwin/NSString+MGLAdditions.m',
- '../include/mbgl/darwin/MGLTypes.h',
'../platform/darwin/MGLTypes.m',
- '../include/mbgl/darwin/MGLStyle.h',
'../platform/darwin/MGLStyle.mm',
- '../include/mbgl/darwin/MGLGeometry.h',
'../platform/darwin/MGLGeometry_Private.h',
'../platform/darwin/MGLGeometry.mm',
- '../include/mbgl/darwin/MGLAnnotation.h',
- '../include/mbgl/darwin/MGLShape.h',
'../platform/darwin/MGLShape.m',
- '../include/mbgl/darwin/MGLMultiPoint.h',
'../platform/darwin/MGLMultiPoint_Private.h',
'../platform/darwin/MGLMultiPoint.mm',
- '../include/mbgl/darwin/MGLOverlay.h',
- '../include/mbgl/darwin/MGLPointAnnotation.h',
'../platform/darwin/MGLPointAnnotation.m',
- '../include/mbgl/darwin/MGLPolyline.h',
'../platform/darwin/MGLPolyline.mm',
- '../include/mbgl/darwin/MGLPolygon.h',
'../platform/darwin/MGLPolygon.mm',
- '../include/mbgl/darwin/MGLMapCamera.h',
'../platform/darwin/MGLMapCamera.mm',
- '../include/mbgl/ios/Mapbox.h',
'../platform/ios/src/MGLMapboxEvents.h',
'../platform/ios/src/MGLMapboxEvents.m',
- '../include/mbgl/ios/MGLMapView.h',
- '../include/mbgl/ios/MGLMapView+IBAdditions.h',
- '../include/mbgl/ios/MGLMapView+MGLCustomStyleLayerAdditions.h',
'../platform/ios/src/MGLMapView.mm',
- '../include/mbgl/ios/MGLAccountManager.h',
'../platform/ios/src/MGLAccountManager_Private.h',
'../platform/ios/src/MGLAccountManager.m',
- '../include/mbgl/ios/MGLUserLocation.h',
'../platform/ios/src/MGLUserLocation_Private.h',
'../platform/ios/src/MGLUserLocation.m',
'../platform/ios/src/MGLUserLocationAnnotationView.h',
'../platform/ios/src/MGLUserLocationAnnotationView.m',
- '../include/mbgl/ios/MGLAnnotationImage.h',
'../platform/ios/src/MGLAnnotationImage_Private.h',
'../platform/ios/src/MGLAnnotationImage.m',
'../include/mbgl/ios/MGLCalloutView.h',
'../platform/ios/src/MGLCompactCalloutView.h',
'../platform/ios/src/MGLCompactCalloutView.m',
- '../platform/ios/src/MGLCategoryLoader.h',
- '../platform/ios/src/MGLCategoryLoader.m',
'../platform/ios/src/NSBundle+MGLAdditions.h',
'../platform/ios/src/NSBundle+MGLAdditions.m',
'../platform/ios/src/NSProcessInfo+MGLAdditions.h',
@@ -82,7 +63,6 @@
'../platform/ios/vendor/Fabric/FABKitProtocol.h',
'../platform/ios/vendor/Fabric/Fabric.h',
'../platform/ios/vendor/Fabric/Fabric+FABKits.h',
- '../platform/ios/resources/',
],
'variables': {
@@ -93,21 +73,24 @@
'<@(sqlite_cflags)',
'<@(zlib_cflags)',
],
+ 'ldflags': [
+ '<@(sqlite_ldflags)',
+ '<@(zlib_ldflags)',
+ ],
'libraries': [
'<@(libuv_static_libs)',
'<@(sqlite_static_libs)',
'<@(zlib_static_libs)',
- ],
- 'ldflags': [
- '<@(sqlite_ldflags)',
- '<@(zlib_ldflags)',
- '-framework CoreLocation',
- '-framework GLKit',
- '-framework ImageIO',
- '-framework MobileCoreServices',
- '-framework QuartzCore',
- '-framework SystemConfiguration',
- '-ObjC',
+ '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
+ '$(SDKROOT)/System/Library/Frameworks/CoreLocation.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',
+ '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Security.framework',
+ '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
+ '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
],
},
@@ -138,7 +121,7 @@
'../include',
],
'mac_bundle_resources': [
- '<!@(find ../platform/ios/resources -type f \! -name "README")',
+ '<!@(find ../platform/ios/resources -type f \! -name "README" \! -name \'.*\')',
],
},
},