diff options
-rw-r--r-- | platform/osx/sdk/framework-osx.gypi | 32 | ||||
-rwxr-xr-x | scripts/osx/package.sh | 6 |
2 files changed, 31 insertions, 7 deletions
diff --git a/platform/osx/sdk/framework-osx.gypi b/platform/osx/sdk/framework-osx.gypi index f4c7ed70b1..d38c695071 100644 --- a/platform/osx/sdk/framework-osx.gypi +++ b/platform/osx/sdk/framework-osx.gypi @@ -18,13 +18,22 @@ ], 'xcode_settings': { - 'SDKROOT': 'macosx', - 'SUPPORTED_PLATFORMS':'macosx', - 'OTHER_LDFLAGS': [ '-stdlib=libc++', '-lstdc++' ], - 'INSTALL_PATH': '@executable_path/../Frameworks', - 'INFOPLIST_FILE': '../platform/osx/sdk/Info.plist', 'CLANG_ENABLE_OBJC_ARC': 'YES', + 'CURRENT_PROJECT_VERSION': '0', + 'DEFINES_MODULE': 'YES', + 'DYLIB_INSTALL_NAME_BASE': '@rpath', + 'INFOPLIST_FILE': '../platform/osx/sdk/Info.plist', + 'LD_RUNPATH_SEARCH_PATHS': [ + '$(inherited)', + '@executable_path/Frameworks', + '@loader_path/Frameworks', + ], 'PRODUCT_BUNDLE_IDENTIFIER': 'com.mapbox.MapboxGL', + 'OTHER_LDFLAGS': [ '-stdlib=libc++', '-lstdc++' ], + 'SDKROOT': 'macosx', + 'SKIP_INSTALL': 'YES', + 'SUPPORTED_PLATFORMS':'macosx', + 'VERSIONING_SYSTEM': 'apple-generic', }, 'mac_framework_headers': [ @@ -37,6 +46,19 @@ './Mapbox.m', ], + 'configurations': { + 'Debug': { + 'xcode_settings': { + 'GCC_OPTIMIZATION_LEVEL': '0', + }, + }, + 'Release': { + 'xcode_settings': { + 'GCC_OPTIMIZATION_LEVEL': 's', + }, + }, + }, + 'direct_dependent_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', diff --git a/scripts/osx/package.sh b/scripts/osx/package.sh index d017ccb3d3..f39d730674 100755 --- a/scripts/osx/package.sh +++ b/scripts/osx/package.sh @@ -27,12 +27,14 @@ export BUILDTYPE=${BUILDTYPE:-Release} export HOST=osx make Xcode/osx -step "Building OS X framework (build ${TRAVIS_JOB_NUMBER:-${BITRISE_BUILD_NUMBER:-0}})..." +VERSION=${TRAVIS_JOB_NUMBER:-${BITRISE_BUILD_NUMBER:-0}} + +step "Building OS X framework (build ${VERSION})..." 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}} \ + CURRENT_PROJECT_VERSION=${VERSION} \ -project ./build/osx-x86_64/gyp/osx.xcodeproj \ -configuration ${BUILDTYPE} \ -target osxsdk \ |