build-scripts/iosbuild.sh
changeset 6334 85b8778a05c2
parent 6333 8d541aa4e1da
child 10904 4dbd025c4eb9
equal deleted inserted replaced
6333:8d541aa4e1da 6334:85b8778a05c2
    10 fi
    10 fi
    11 
    11 
    12 # SDK path
    12 # SDK path
    13 XCODE_PATH=`xcode-select --print-path`
    13 XCODE_PATH=`xcode-select --print-path`
    14 if [ -z "$XCODE_PATH" ]; then
    14 if [ -z "$XCODE_PATH" ]; then
    15     echo "Could not find XCode location"
    15     echo "Could not find XCode location (use xcode-select -switch to set the correct path)"
    16     exit 1
    16     exit 1
    17 fi
    17 fi
    18 
    18 
    19 prepare_environment() {
    19 prepare_environment() {
    20     ARCH=$1
    20     ARCH=$1
   248 if test x$merge = xyes; then
   248 if test x$merge = xyes; then
   249     output=ios/lib
   249     output=ios/lib
   250     sh $auxdir/mkinstalldirs build/$output
   250     sh $auxdir/mkinstalldirs build/$output
   251     cd build
   251     cd build
   252     target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
   252     target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
   253     (lipo -create -o $output/libSDL2.a */build/.libs/libSDL2.a &&
   253     (lipo -create -o $output/libSDL2.a armv6/build/.libs/libSDL2.a armv7/build/.libs/libSDL2.a i386/build/.libs/libSDL2.a &&
   254      lipo -create -o $output/libSDL2main.a */build/libSDL2main.a &&
   254      lipo -create -o $output/libSDL2main.a armv6/build/libSDL2main.a armv7/build/libSDL2main.a i386/build/libSDL2main.a &&
   255      cp -r armv6/include ios
   255      cp -r armv6/include ios
   256      echo "Build complete!" &&
   256      echo "Build complete!" &&
   257      echo "Files can be found under the build/ios directory.") || exit 4
   257      echo "Files can be found under the build/ios directory.") || exit 4
   258     cd ..
   258     cd ..
   259 fi
   259 fi