This repository was archived by the owner on Jun 14, 2024. It is now read-only.
forked from microsoft/cpprestsdk
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfigure.sh
More file actions
executable file
·44 lines (40 loc) · 1.47 KB
/
configure.sh
File metadata and controls
executable file
·44 lines (40 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -e
if [ ! -e boost.framework ]
then
git clone -n https://github.com/faithfracture/Apple-Boost-BuildScript Apple-Boost-BuildScript
pushd Apple-Boost-BuildScript
git checkout 86f7570fceaef00846cc75f59c61474758fc65cb
BOOST_LIBS="thread chrono filesystem regex system random" ./boost.sh
popd
mv Apple-Boost-BuildScript/build/boost/1.63.0/ios/framework/boost.framework .
mv boost.framework/Versions/A/Headers boost.headers
mkdir -p boost.framework/Versions/A/Headers
mv boost.headers boost.framework/Versions/A/Headers/boost
fi
if [ ! -e openssl/lib/libcrypto.a ]
then
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git
pushd OpenSSL-for-iPhone
./build-libssl.sh
popd
mkdir -p openssl/lib
cp -r OpenSSL-for-iPhone/bin/iPhoneOS9.2-armv7.sdk/include openssl
cp OpenSSL-for-iPhone/include/LICENSE openssl
lipo -create -output openssl/lib/libssl.a OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a
lipo -create -output openssl/lib/libcrypto.a OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a
fi
if [ ! -e ios-cmake/toolchain/iOS.cmake ]
then
git clone https://github.com/cristeab/ios-cmake.git
pushd ios-cmake
git apply ../fix_ios_cmake_compiler.patch
popd
fi
mkdir -p build.ios
pushd build.ios
cmake .. -DCMAKE_BUILD_TYPE=Release
make
popd
echo "===="
echo "The final library is available in 'build.ios/libcpprest.a'"