diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-04-15 14:51:11 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-04-16 22:46:26 -0700 |
commit | f83c7a8b81441099436dbe5c565e1f87bbd40f6f (patch) | |
tree | bc61bf38e89db50cca953dd93cb1376a154d89f8 /platform | |
parent | 61c9faaf99d5af938e9264d439ed1340db089ed1 (diff) | |
download | qtlocation-mapboxgl-f83c7a8b81441099436dbe5c565e1f87bbd40f6f.tar.gz |
[ios] Force workspace-relative DerivedData
A workspace places derived data under ~/Library/ by default. We need it to live under build/ for all users. Instead of a legacy-style build products directory, force a workspace-relative DerivedData directory that matches the standard Xcode 4+ layout. Share the workspace settings file that forces the setting. Note that Xcode places its build and index output one level deeper than xcodebuild does.
Also fixed make ipackage-sim by conditionalizing anything related to the .dSYM file, which isn’t generated in the Debug configuration.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings | 18 | ||||
-rwxr-xr-x | platform/ios/scripts/package.sh | 34 |
2 files changed, 39 insertions, 13 deletions
diff --git a/platform/ios/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/platform/ios/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..09129db48c --- /dev/null +++ b/platform/ios/ios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>BuildLocationStyle</key> + <string>UseAppPreferences</string> + <key>CustomBuildLocationType</key> + <string>RelativeToDerivedData</string> + <key>DerivedDataCustomLocation</key> + <string>../../build/DerivedData</string> + <key>DerivedDataLocationStyle</key> + <string>WorkspaceRelativePath</string> + <key>IssueFilterStyle</key> + <string>ShowActiveSchemeOnly</string> + <key>LiveSourceIssuesEnabled</key> + <true/> +</dict> +</plist> diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index bfc34bf3cb..5396ee7667 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -6,6 +6,8 @@ set -u NAME=Mapbox OUTPUT=build/ios/pkg +DERIVED_DATA=build/DerivedData/ios +PRODUCTS=${DERIVED_DATA}/Build/Products BUILDTYPE=${BUILDTYPE:-Release} BUILD_FOR_DEVICE=${BUILD_DEVICE:-true} @@ -84,6 +86,7 @@ fi xcodebuild \ GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ + -derivedDataPath ${DERIVED_DATA} \ -workspace ./platform/ios/ios.xcworkspace \ -scheme ${SCHEME} \ -configuration ${BUILDTYPE} \ @@ -94,6 +97,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then xcodebuild \ GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ + -derivedDataPath ${DERIVED_DATA} \ -workspace ./platform/ios/ios.xcworkspace \ -scheme ${SCHEME} \ -configuration ${BUILDTYPE} \ @@ -111,22 +115,24 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then libtool -static -no_warning_for_no_symbols \ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \ -o ${OUTPUT}/static/${NAME}.framework/${NAME} \ - ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphoneos/libmbgl-} \ - ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-} + ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/libmbgl-} \ + ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/libmbgl-} fi if [[ ${BUILD_DYNAMIC} == true ]]; then step "Copying dynamic framework into place for iOS devices" cp -r \ - build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework \ - ${OUTPUT}/dynamic/ - cp -r build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \ + ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.framework \ ${OUTPUT}/dynamic/ + if [[ -e ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM ]]; then + cp -r ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \ + ${OUTPUT}/dynamic/ + fi step "Merging simulator dynamic library into device dynamic library…" lipo \ - build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \ - build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \ + ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \ + ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \ -create -output ${OUTPUT}/dynamic/${NAME}.framework/${NAME} | echo fi else @@ -136,16 +142,18 @@ else libtool -static -no_warning_for_no_symbols \ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \ -o ${OUTPUT}/static/${NAME}.framework/${NAME} \ - ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-} + ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/libmbgl-} fi if [[ ${BUILD_DYNAMIC} == true ]]; then step "Copying dynamic framework into place for iOS Simulator…" cp -r \ - build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework \ + ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.framework \ ${OUTPUT}/dynamic/${NAME}.framework - cp -r build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \ - ${OUTPUT}/dynamic/ + if [[ -e ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM ]]; then + cp -r ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \ + ${OUTPUT}/dynamic/ + fi fi fi @@ -168,9 +176,9 @@ fi if [[ ${BUILD_STATIC} == true ]]; then step "Copying static library headers…" - cp -rv "build/ios-all/${BUILDTYPE}-iphoneos/Headers" "${OUTPUT}/static/${NAME}.framework/Headers" + cp -rv "${PRODUCTS}/${BUILDTYPE}-iphoneos/Headers" "${OUTPUT}/static/${NAME}.framework/Headers" cat platform/ios/framework/Mapbox-static.h > "${OUTPUT}/static/${NAME}.framework/Headers/Mapbox.h" - cat "build/ios-all/${BUILDTYPE}-iphoneos/Headers/Mapbox.h" >> "${OUTPUT}/static/${NAME}.framework/Headers/Mapbox.h" + cat "${PRODUCTS}/${BUILDTYPE}-iphoneos/Headers/Mapbox.h" >> "${OUTPUT}/static/${NAME}.framework/Headers/Mapbox.h" fi step "Copying library resources…" |