mirror of https://github.com/FreeRDP/FreeRDP
Use cmake from NDK
This commit is contained in:
parent
1c77db0a94
commit
fd9b5463a0
|
@ -11,6 +11,10 @@ if [ -z $NDK_TARGET ]; then
|
|||
NDK_TARGET=21
|
||||
fi
|
||||
|
||||
if [ -z $CMAKE_PROGRAM ]; then
|
||||
CMAKE_PROGRAM=$(find $ANDROID_SDK/cmake -name cmake -type f -executable -print -quit)
|
||||
fi
|
||||
|
||||
if [ -z $CCACHE ]; then
|
||||
CCACHE=$(which ccache)
|
||||
fi
|
||||
|
@ -19,6 +23,10 @@ if [ -z $ANDROID_NDK ]; then
|
|||
ANDROID_NDK="missing"
|
||||
fi
|
||||
|
||||
if [ -z $ANDROID_SDK ]; then
|
||||
ANDROID_SDK="missing"
|
||||
fi
|
||||
|
||||
if [ -z $BUILD_DST ]; then
|
||||
BUILD_DST=$(pwd)/libs
|
||||
fi
|
||||
|
@ -41,6 +49,8 @@ function common_help {
|
|||
echo "$(BASHSOURCE[0]) supports the following arguments:"
|
||||
echo " --ndk The base directory of your android NDK defa"
|
||||
echo " ANDROID_NDK=$ANDROID_NDK"
|
||||
echo " --sdk The base directory of your android SDK defa"
|
||||
echo " ANDROID_SDK=$ANDROID_SDK"
|
||||
echo " --arch A list of architectures to build"
|
||||
echo " BUILD_ARCH=$BUILD_ARCH"
|
||||
echo " --dst The destination directory for include and library files"
|
||||
|
@ -87,6 +97,12 @@ function common_parse_arguments {
|
|||
shift
|
||||
;;
|
||||
|
||||
--sdk)
|
||||
ANDROID_SDK="$2"
|
||||
CMAKE_PROGRAM=$(find $ANDROID_SDK/cmake -name cmake -type f -executable -print -quit)
|
||||
shift
|
||||
;;
|
||||
|
||||
--arch)
|
||||
BUILD_ARCH="$2"
|
||||
shift
|
||||
|
@ -136,6 +152,11 @@ function common_check_requirements {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d $ANDROID_SDK ]];
|
||||
then
|
||||
echo "export ANDROID_SDK to point to your SDK location."
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z $BUILD_DST ]];
|
||||
then
|
||||
echo "Destination directory not valid"
|
||||
|
@ -174,13 +195,11 @@ function common_check_requirements {
|
|||
NDK_BUILD=ndk-build
|
||||
fi
|
||||
|
||||
if [[ -z $NDK_BUILD ]];
|
||||
then
|
||||
echo "Android ndk-build not detected"
|
||||
exit 1
|
||||
if [ -z $CMAKE_PROGRAM ]; then
|
||||
CMAKE_PROGRAM=$(find $ANDROID_SDK/cmake -name cmake -type f -executable -print -quit)
|
||||
fi
|
||||
|
||||
for CMD in make git cmake $NDK_BUILD
|
||||
for CMD in make git $CMAKE_PROGRAM $NDK_BUILD
|
||||
do
|
||||
if ! type $CMD >/dev/null; then
|
||||
echo "Command $CMD not found. Install and add it to the PATH."
|
||||
|
|
|
@ -140,7 +140,7 @@ do
|
|||
common_run mkdir -p $BUILD_SRC/freerdp-build/$ARCH
|
||||
common_run cd $BUILD_SRC/freerdp-build/$ARCH
|
||||
common_run export ANDROID_NDK=$ANDROID_NDK
|
||||
common_run cmake $CMAKE_CMD_ARGS \
|
||||
common_run $CMAKE_PROGRAM $CMAKE_CMD_ARGS \
|
||||
-DANDROID_ABI=$ARCH \
|
||||
-DCMAKE_INSTALL_PREFIX=$BUILD_DST/$ARCH \
|
||||
-DCMAKE_INSTALL_LIBDIR=. \
|
||||
|
|
Loading…
Reference in New Issue