|
1 | 1 | #!/bin/bash
|
2 | 2 | set -e
|
3 | 3 |
|
4 |
| -git clone https://gist.github.com/c629ae4c7168216a9856.git boostoniphone |
5 |
| -pushd boostoniphone |
6 |
| -git apply ../fix_boost_version.patch |
7 |
| -./boost.sh |
8 |
| -popd |
9 |
| -mv boostoniphone/ios/framework/boost.framework . |
| 4 | +if [ ! -e boost.framework ] |
| 5 | + then |
| 6 | + git clone -n https://github.com/faithfracture/Apple-Boost-BuildScript Apple-Boost-BuildScript |
| 7 | + pushd Apple-Boost-BuildScript |
| 8 | + git checkout 86f7570fceaef00846cc75f59c61474758fc65cb |
| 9 | + BOOST_LIBS="thread chrono filesystem regex system random" ./boost.sh |
| 10 | + popd |
| 11 | + mv Apple-Boost-BuildScript/build/boost/1.63.0/ios/framework/boost.framework . |
| 12 | + mv boost.framework/Versions/A/Headers boost.headers |
| 13 | + mkdir -p boost.framework/Versions/A/Headers |
| 14 | + mv boost.headers boost.framework/Versions/A/Headers/boost |
| 15 | +fi |
10 | 16 |
|
11 |
| -git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git |
12 |
| -pushd OpenSSL-for-iPhone |
13 |
| -./build-libssl.sh |
14 |
| -popd |
15 |
| -mkdir -p openssl/lib |
16 |
| -cp -r OpenSSL-for-iPhone/bin/iPhoneOS8.2-armv7.sdk/include openssl |
17 |
| -cp OpenSSL-for-iPhone/include/LICENSE openssl |
18 |
| -lipo -create -output openssl/lib/libssl.a OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a |
19 |
| -lipo -create -output openssl/lib/libcrypto.a OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a |
| 17 | +if [ ! -e openssl/lib/libcrypto.a ] |
| 18 | + then |
| 19 | + git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git |
| 20 | + pushd OpenSSL-for-iPhone |
| 21 | + ./build-libssl.sh |
| 22 | + popd |
| 23 | + mkdir -p openssl/lib |
| 24 | + cp -r OpenSSL-for-iPhone/bin/iPhoneOS9.2-armv7.sdk/include openssl |
| 25 | + cp OpenSSL-for-iPhone/include/LICENSE openssl |
| 26 | + lipo -create -output openssl/lib/libssl.a OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a |
| 27 | + lipo -create -output openssl/lib/libcrypto.a OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a |
| 28 | +fi |
20 | 29 |
|
21 |
| -git clone https://github.com/cristeab/ios-cmake.git |
22 |
| -pushd ios-cmake |
23 |
| -git apply ../fix_ios_cmake_compiler.patch |
24 |
| -popd |
25 |
| -mkdir build.ios |
| 30 | +if [ ! -e ios-cmake/toolchain/iOS.cmake ] |
| 31 | + then |
| 32 | + git clone https://github.com/cristeab/ios-cmake.git |
| 33 | + pushd ios-cmake |
| 34 | + git apply ../fix_ios_cmake_compiler.patch |
| 35 | + popd |
| 36 | +fi |
| 37 | + |
| 38 | +mkdir -p build.ios |
26 | 39 | pushd build.ios
|
27 | 40 | cmake .. -DCMAKE_BUILD_TYPE=Release
|
28 | 41 | make
|
|
0 commit comments