11export REPO_ROOT=` pwd`
22export PATH=$PATH :$REPO_ROOT /tools/bin
3- AVAILABLE_PLATFORMS=(iphoneos iphonesimulator maccatalyst)
3+ AVAILABLE_PLATFORMS=(maccatalyst-arm64) # ( iphoneos iphonesimulator maccatalyst)
44AVAILABLE_FRAMEWORKS=(libpcre openssl libssh2 libgit2)
55
66# Download build tools
@@ -45,6 +45,13 @@ function setup_variables() {
4545
4646 " maccatalyst" )
4747 ARCH=x86_64
48+ # We would like to append
49+ # -DCMAKE_C_FLAGS="-target $ARCH-apple-ios14.1-macabi"
50+ # to CMAKE_ARGS but that won't work due to the space!
51+ SYSROOT=` xcodebuild -version -sdk macosx Path` ;;
52+
53+ " maccatalyst-arm64" )
54+ ARCH=arm64
4855 SYSROOT=` xcodebuild -version -sdk macosx Path` ;;
4956
5057 * )
@@ -84,7 +91,7 @@ function build_libgit2() {
8491 " iphoneos" |" iphonesimulator" )
8592 cmake ${CMAKE_ARGS[@]} ..;;
8693
87- " maccatalyst" )
94+ " maccatalyst" | " maccatalyst-arm64 " )
8895 cmake ${CMAKE_ARGS[@]} -DCMAKE_C_FLAGS=" -target $ARCH -apple-ios14.1-macabi" ..;;
8996 esac
9097
@@ -110,7 +117,7 @@ function build_libpcre() {
110117 " iphoneos" |" iphonesimulator" )
111118 cmake ${CMAKE_ARGS[@]} ..;;
112119
113- " maccatalyst" )
120+ " maccatalyst" | " maccatalyst-arm64 " )
114121 cmake ${CMAKE_ARGS[@]} -DCMAKE_C_FLAGS=" -target $ARCH -apple-ios14.1-macabi" ..;;
115122 esac
116123
@@ -136,7 +143,7 @@ function build_openssl() {
136143 TARGET_OS=iossimulator-xcrun
137144 export CFLAGS=" -isysroot $SYSROOT " ;;
138145
139- " maccatalyst" )
146+ " maccatalyst" | " maccatalyst-arm64 " )
140147 TARGET_OS=darwin64-$ARCH -cc
141148 export CFLAGS=" -isysroot $SYSROOT -target $ARCH -apple-ios14.1-macabi" ;;
142149
@@ -173,7 +180,7 @@ function build_libssh2() {
173180 " iphoneos" |" iphonesimulator" )
174181 cmake ${CMAKE_ARGS[@]} ..;;
175182
176- " maccatalyst" )
183+ " maccatalyst" | " maccatalyst-arm64 " )
177184 cmake ${CMAKE_ARGS[@]} -DCMAKE_C_FLAGS=" -target $ARCH -apple-ios14.1-macabi" ..;;
178185 esac
179186
224231# build_xcframework $fw ${AVAILABLE_PLATFORMS[@]}
225232# done
226233
227- build_xcframework libgit2 ${AVAILABLE_PLATFORMS[@]}
228- copy_modulemap
234+ # build_xcframework libgit2 ${AVAILABLE_PLATFORMS[@]}
235+ # copy_modulemap
229236
230- zip -r Clibgit2.xcframework.zip Clibgit2.xcframework/
237+ # zip -r Clibgit2.xcframework.zip Clibgit2.xcframework/
0 commit comments