Last active
April 12, 2024 01:40
-
-
Save superwills/287d7ebc25afd868210e37482d33b97a to your computer and use it in GitHub Desktop.
Build Curl for iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IF SOMETHING IS NOT WORKING, BLOW AWAY YOUR CURL DOWNLOAD FOLDER AND THEN RE-UN-ZIP IT BECAUSE IT CACHES | |
# STATE BEYOND WHAT make clean CAN GET RID OF | |
# iPhone | |
export ARCH=arm64 | |
export SDK=iphoneos | |
export DEPLOYMENT_TARGET=12.0 | |
sudo xcode-select --switch /Applications/Xcode.app | |
export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET" | |
# ./configure is not in the github it is in the libcurl download https://curl.se/download.html | |
./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts-iphone --with-secure-transport --enable-static --disable-shared | |
make -j8 | |
make install | |
# Build results are in the artifacts-iphone folder | |
# iPhone Simulator. __WARNING: USE A COMPLETELY SEPARATE COPY OF THE | |
# be sure to link in zlib (-lz) and the Security.Framework to your project | |
export ARCH=arm64 | |
export SDK=iphonesimulator | |
export DEPLOYMENT_TARGET=12.0 | |
sudo xcode-select --switch /Applications/Xcode.app | |
export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET" | |
./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts-iphonesimulator --with-secure-transport | |
make -j8 | |
make install | |
# Build results are in the artifacts-iphonesimulator folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment