File tree 2 files changed +30
-9
lines changed
2 files changed +30
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
4
- # git clone https://github.com/leetal/ios-cmake
5
- # cd socket.io-client-cpp
6
-
7
3
export DARWIN_DEPLOYMENT_TARGET=8.0
8
4
9
- archs=" armv7 armv7s arm64 i386 x86_64"
5
+ build_type=${1:- Release}
6
+ rebuild=${2}
7
+ archs=" armv7 armv7s armv8 x86 x86_64"
10
8
11
9
rm -rf build-ios-* /
12
10
rm libssl.a
13
11
rm libcrypto.a
14
12
rm libboost_* .a
15
13
rm libsioclient_tls.a
16
14
15
+ if [ ! -d ios-cmake ]; then
16
+ git clone https://github.com/leetal/ios-cmake
17
+ fi
18
+
17
19
for arch in $archs ; do
18
20
mkdir -p build-ios-$arch && pushd build-ios-$arch
19
21
20
- conan install .. --profile ~ /.conan/profiles/ios- $arch --build
22
+ conan install .. -s arch= ${arch} -s compiler=apple-clang -s compiler.version=9.1 -s os=iOS -s os.version=8.0 -s compiler.libcxx=libc++ -s build_type= ${build_type} ${rebuild}
21
23
22
24
platform=" OS"
23
- if [ " $arch " = " i386 " ]; then
25
+ if [ " $arch " = " x86 " ]; then
24
26
platform=" SIMULATOR"
25
27
elif [ " $arch " = " x86_64" ]; then
26
28
platform=" SIMULATOR64"
27
29
fi
28
30
29
- cmake -DCMAKE_TOOLCHAIN_FILE=../ios-cmake/ios.toolchain.cmake -DIOS_PLATFORM=$platform ..
31
+ cmake -DCMAKE_TOOLCHAIN_FILE=../ios-cmake/ios.toolchain.cmake -DIOS_PLATFORM=$platform -DIOS_DEPLOYMENT_TARGET=8.0 -DENABLE_BITCODE=YES -DCMAKE_BUILD_TYPE= ${build_type} ..
30
32
cmake --build .
31
33
32
34
popd
33
35
done
34
36
35
- lipo -create build-ios-arm64 /libsioclient_tls.a build-ios-x86_64/libsioclient_tls.a build-ios-i386 /libsioclient_tls.a -output libsioclient_tls.a
37
+ lipo -create build-ios-armv8 /libsioclient_tls.a build-ios-x86_64/libsioclient_tls.a build-ios-x86 /libsioclient_tls.a -output libsioclient_tls.a
36
38
37
39
lipo -create ~ /.conan/data/OpenSSL/1.1.1/conan/stable/package/* /lib/libssl.a -output libssl.a
38
40
lipo -create ~ /.conan/data/OpenSSL/1.1.1/conan/stable/package/* /lib/libcrypto.a -output libcrypto.a
Original file line number Diff line number Diff line change
1
+ version : 2
2
+ jobs :
3
+ build :
4
+ working_directory : ~/socket.io-client-cpp
5
+ macos :
6
+ xcode : " 9.0"
7
+ steps :
8
+ - checkout
9
+ - run :
10
+ name : " Pull Submodules"
11
+ command : |
12
+ git submodule init
13
+ git submodule update --remote
14
+ - run :
15
+ name : Install dependencies
16
+ command : brew install conan cmake
17
+ - run :
18
+ name : Building
19
+ command : ./build_ios_fat.sh Release --build
You can’t perform that action at this time.
0 commit comments