-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from ivpn/task/liboqs-build-script
Build script for liboqs library
- Loading branch information
Showing
5 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
BRANCH=ivpn-ios-app | ||
IN_LIBOQS=lib/Release/liboqs.a | ||
OUT_LIBOQS_IPHONEOS=../../IVPNClient/liboqs/liboqs-iphoneos.a | ||
OUT_LIBOQS_IPHONESIMULATOR=../../IVPNClient/liboqs/liboqs-iphonesimulator.a | ||
|
||
set -e | ||
|
||
# Clone liboqs | ||
echo "=> Clone liboqs" | ||
mkdir -p submodules | ||
cd submodules | ||
if [ ! -d "liboqs" ] ; then | ||
git clone --depth 1 --branch ${BRANCH} https://github.com/ivpn/liboqs | ||
fi | ||
cd liboqs | ||
|
||
# liboqs for iphoneos | ||
echo "=> Build liboqs-iphoneos.a" | ||
cmake -G Xcode -DOQS_USE_OPENSSL=OFF -DOQS_BUILD_ONLY_LIB=ON -DOQS_DIST_BUILD=ON -DOQS_MINIMAL_BUILD="KEM_kyber_1024;" -DCMAKE_TOOLCHAIN_FILE=.CMake/toolchain_ios.cmake -DPLATFORM=OS64 | ||
cmake --build . --config Release | ||
|
||
echo "=> Copy liboqs.a to ${OUT_LIBOQS_IPHONEOS}" | ||
cp -f $IN_LIBOQS $OUT_LIBOQS_IPHONEOS | ||
|
||
echo "=> Clean files" | ||
rm -rf $IN_LIBOQS | ||
git clean -fd | ||
|
||
echo "=> Build completed for ${OUT_LIBOQS_IPHONEOS}" | ||
|
||
# liboqs for iphonesimulator | ||
echo "=> Build liboqs-iphonesimulator.a" | ||
cmake -G Xcode -DOQS_USE_OPENSSL=OFF -DOQS_BUILD_ONLY_LIB=ON -DOQS_DIST_BUILD=ON -DOQS_MINIMAL_BUILD="KEM_kyber_1024;" -DCMAKE_TOOLCHAIN_FILE=.CMake/toolchain_ios.cmake -DPLATFORM=SIMULATORARM64 | ||
cmake --build . --config Release | ||
|
||
echo "=> Copy liboqs.a to ${OUT_LIBOQS_IPHONESIMULATOR}" | ||
cp -f $IN_LIBOQS $OUT_LIBOQS_IPHONESIMULATOR | ||
|
||
echo "=> Clean files" | ||
rm -rf $IN_LIBOQS | ||
git clean -fd | ||
|
||
echo "=> Build completed for ${OUT_LIBOQS_IPHONESIMULATOR}" | ||
|
||
|
||
echo "=> BUILD SUCCESSFUL" |
File renamed without changes.