[osx] Moved Mapbox.{h,m} into framework proper; set version variables

This commit is contained in:
Minh Nguyễn
2015-12-02 13:17:02 -08:00
committed by Minh Nguyễn
parent 1598330a93
commit 47fb5e820b
6 changed files with 28 additions and 32 deletions

View File

@@ -43,7 +43,6 @@
'../platform/darwin/MGLPolyline.mm',
'../include/mbgl/darwin/MGLPolygon.h',
'../platform/darwin/MGLPolygon.mm',
'../include/mbgl/osx/Mapbox.h',
'../include/mbgl/osx/MGLAccountManager.h',
'../platform/osx/src/MGLAccountManager_Private.h',
'../platform/osx/src/MGLAccountManager.m',

View File

@@ -1,15 +0,0 @@
#import "MGLAccountManager.h"
#import "MGLAnnotation.h"
#import "MGLAnnotationImage.h"
#import "MGLGeometry.h"
#import "MGLMapView.h"
#import "MGLMapView+IBAdditions.h"
#import "MGLMapViewDelegate.h"
#import "MGLMultiPoint.h"
#import "MGLOverlay.h"
#import "MGLPointAnnotation.h"
#import "MGLPolygon.h"
#import "MGLPolyline.h"
#import "MGLShape.h"
#import "MGLStyle.h"
#import "MGLTypes.h"

23
platform/osx/sdk/Mapbox.h Normal file
View File

@@ -0,0 +1,23 @@
#import <Cocoa/Cocoa.h>
/// Project version number for Mapbox.
FOUNDATION_EXPORT double MapboxVersionNumber;
/// Project version string for Mapbox.
FOUNDATION_EXPORT const unsigned char MapboxVersionString[];
#import <Mapbox/MGLAccountManager.h>
#import <Mapbox/MGLAnnotation.h>
#import <Mapbox/MGLAnnotationImage.h>
#import <Mapbox/MGLGeometry.h>
#import <Mapbox/MGLMapView.h>
#import <Mapbox/MGLMapView+IBAdditions.h>
#import <Mapbox/MGLMapViewDelegate.h>
#import <Mapbox/MGLMultiPoint.h>
#import <Mapbox/MGLOverlay.h>
#import <Mapbox/MGLPointAnnotation.h>
#import <Mapbox/MGLPolygon.h>
#import <Mapbox/MGLPolyline.h>
#import <Mapbox/MGLShape.h>
#import <Mapbox/MGLStyle.h>
#import <Mapbox/MGLTypes.h>

View File

@@ -1,4 +1,4 @@
#import <mbgl/osx/Mapbox.h>
#import <Mapbox/Mapbox.h>
#import "../src/NSBundle+MGLAdditions.h"
#import "../src/NSProcessInfo+MGLAdditions.h"

View File

@@ -28,10 +28,12 @@
},
'mac_framework_headers': [
'./Mapbox.h',
'<!@(find ../include/mbgl/{darwin,osx} -type f \! -name \'.*\')',
],
'sources': [
'./Mapbox.h',
'./Mapbox.m',
],

View File

@@ -21,31 +21,18 @@ function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
rm -rf ${OUTPUT}
mkdir -p "${OUTPUT}"/shared
step "Recording library version..."
VERSION="${OUTPUT}"/shared/version.txt
echo -n "https://github.com/mapbox/mapbox-gl-native/commit/" > ${VERSION}
HASH=`git log | head -1 | awk '{ print $2 }' | cut -c 1-10` && true
echo -n "mapbox-gl-native "
echo ${HASH}
echo ${HASH} >> ${VERSION}
step "Creating build files..."
export MASON_PLATFORM=osx
export BUILDTYPE=${BUILDTYPE:-Release}
export HOST=osx
make Xcode/osx
step "Building OS X targets..."
step "Building OS X framework (build ${TRAVIS_JOB_NUMBER:-${BITRISE_BUILD_NUMBER:-0}})..."
xcodebuild -sdk macosx${OSX_SDK_VERSION} \
ARCHS="x86_64" \
ONLY_ACTIVE_ARCH=NO \
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
CURRENT_PROJECT_VERSION=${TRAVIS_JOB_NUMBER:-${BITRISE_BUILD_NUMBER:-0}} \
-project ./build/osx-x86_64/gyp/osx.xcodeproj \
-configuration ${BUILDTYPE} \
-target osxsdk \