Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
21 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
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,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script builds the specific variant of zrtpcpp as used by Silent Phone | ||
# on Android. The script always runs on a clean build directory and copies | ||
# the resulting static library to the SPA jni directory. | ||
# The script requires some environment variables which are either set by the | ||
# build system (Jenkins for example) or by a shell script that call this script. | ||
|
||
if [ ! -d "${WORKSPACE}/silentphone2" ]; then | ||
echo '***** Variable WORKSPACE does not point to correct directory *****' | ||
exit 1 | ||
fi | ||
|
||
if [ "x$ANDROID_NDK" = "x" ]; then | ||
echo '***** Variable ANDROID_NDK not set *****' | ||
exit 1 | ||
fi | ||
|
||
#if [ "x$SC_BUILD_TYPE" = "xDEVELOP" ]; then | ||
# BUILD_TYPE=Debug | ||
# echo "*** building develop configuration" | ||
#else | ||
# BUILD_TYPE="Release" | ||
# echo "*** building release configuration" | ||
#fi | ||
|
||
rm -rf buildTiviAndroid | ||
mkdir buildTiviAndroid | ||
pushd buildTiviAndroid | ||
|
||
cmake -DTIVI=true -DBUILD_STATIC=true -DAXO=true -DANDROID=true .. # -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. | ||
|
||
pushd clients/tivi/android | ||
|
||
if ndk-build; then | ||
echo "ZRTPCPP Android build OK." | ||
else | ||
echo "ZRTPCPP Android build failed!" | ||
exit 1 | ||
fi | ||
|
||
cp obj/local/armeabi-v7a/libzrtpcpp.a ${WORKSPACE}/silentphone2/jni/armeabi-v7a/ | ||
|
||
# cleanup build directory | ||
rm -rf buildTiviAndroid | ||
exit 0 |