-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildscript-ios.sh
executable file
·78 lines (62 loc) · 1.83 KB
/
buildscript-ios.sh
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# Fail on first error
set -e
installDir=Qt/$(basename "$Qt6_DIR_BASE")/ios
echo
echo "bzip2 - static for arm64 and x86_64 on iOS"
$Qt6_DIR_BASE/ios/bin/qt-cmake \
-G Ninja \
-S bzip2 \
-B build-bzip2-iOS \
-DENABLE_APP=OFF \
-DENABLE_DOCS=OFF \
-DENABLE_SHARED_LIB=OFF \
-DENABLE_STATIC_LIB=ON \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_INSTALL_PREFIX=$installDir
cmake --build build-bzip2-iOS
cmake --install build-bzip2-iOS
echo
echo "zlib - static for arm64 and x86_64 on iOS"
$Qt6_DIR_BASE/ios/bin/qt-cmake \
-G Ninja \
-S zlib \
-B build-zlib-iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_INSTALL_PREFIX=$installDir
cmake --build build-zlib-iOS
cmake --install build-zlib-iOS
# Delete dynamic libraries, which create trouble under iOS
rm $installDir/lib/libz*dylib
echo
echo "copy static bzip2 and zlib to development directory, so cmake can find it"
cp -rv $installDir $Qt6_DIR_BASE
echo
echo "libzip - static for arm64 and x86_64 on iOS"
$Qt6_DIR_BASE/ios/bin/qt-cmake \
-G Ninja \
-S libzip \
-B build-libzip-iOS \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF \
-DENABLE_BZIP2=OFF \
-DENABLE_LZMA=OFF \
-DENABLE_ZSTD=OFF \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_INSTALL_PREFIX=$installDir
cmake --build build-libzip-iOS
cmake --install build-libzip-iOS
echo
echo "maplibre for iOS"
$Qt6_DIR_BASE/ios/bin/qt-cmake \
-S maplibre-native-qt \
-B build-maplibre-native-qt-iOS \
-G"Ninja Multi-Config" \
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_INSTALL_PREFIX=$installDir
cmake --build build-maplibre-native-qt-iOS
cmake --install build-maplibre-native-qt-iOS