mirror of https://github.com/FreeRDP/FreeRDP
[build,android] only use CMake from SDK
* only use CMake from android SDK * abort if CMake or ndk-build are not detected
This commit is contained in:
parent
db98f16e5b
commit
8ca386a300
|
@ -8,11 +8,11 @@ case "$(uname -s)" in
|
||||||
|
|
||||||
Darwin)
|
Darwin)
|
||||||
FIND_ARGS="-perm +111 $FIND_ARGS"
|
FIND_ARGS="-perm +111 $FIND_ARGS"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
FIND_ARGS="-executable $FIND_ARGS"
|
FIND_ARGS="-executable $FIND_ARGS"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -z $BUILD_ARCH ]; then
|
if [ -z $BUILD_ARCH ]; then
|
||||||
|
@ -96,10 +96,10 @@ function common_parse_arguments {
|
||||||
do
|
do
|
||||||
key="$1"
|
key="$1"
|
||||||
case $key in
|
case $key in
|
||||||
--conf)
|
--conf)
|
||||||
source "$2" || exit 1
|
source "$2" || exit 1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--target)
|
--target)
|
||||||
NDK_TARGET="$2"
|
NDK_TARGET="$2"
|
||||||
|
@ -217,12 +217,20 @@ function common_check_requirements {
|
||||||
else
|
else
|
||||||
echo "ndk-build not found in NDK directory $ANDROID_NDK"
|
echo "ndk-build not found in NDK directory $ANDROID_NDK"
|
||||||
echo "assuming ndk-build is in path..."
|
echo "assuming ndk-build is in path..."
|
||||||
NDK_BUILD=ndk-build
|
NDK_BUILD=$(which ndk-build)
|
||||||
|
if [ -z $NDK_BUILD ]; then
|
||||||
|
echo "ndk-build not found in $ANDROID_NDK and not in PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $CMAKE_PROGRAM ]; then
|
if [ -z $CMAKE_PROGRAM ]; then
|
||||||
CMAKE_PROGRAM=$(find $ANDROID_SDK/cmake -name cmake $FIND_ARGS)
|
CMAKE_PROGRAM=$(find $ANDROID_SDK/cmake -name cmake $FIND_ARGS)
|
||||||
fi
|
if [ -z $CMAKE_PROGRAM ]; then
|
||||||
|
echo "CMake not found in $ANDROID_SDK, install CMake from the android SDK!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for CMD in make git $CMAKE_PROGRAM $NDK_BUILD
|
for CMD in make git $CMAKE_PROGRAM $NDK_BUILD
|
||||||
do
|
do
|
||||||
|
|
|
@ -173,17 +173,17 @@ do
|
||||||
# Build and install the library.
|
# Build and install the library.
|
||||||
if [ $DEPS_ONLY -eq 0 ];
|
if [ $DEPS_ONLY -eq 0 ];
|
||||||
then
|
then
|
||||||
common_run cd $BASE
|
common_run cd $BASE
|
||||||
common_run mkdir -p $BUILD_SRC/freerdp-build/$ARCH
|
common_run mkdir -p $BUILD_SRC/freerdp-build/$ARCH
|
||||||
common_run cd $BUILD_SRC/freerdp-build/$ARCH
|
common_run cd $BUILD_SRC/freerdp-build/$ARCH
|
||||||
common_run export ANDROID_NDK=$ANDROID_NDK
|
common_run export ANDROID_NDK=$ANDROID_NDK
|
||||||
common_run $CMAKE_PROGRAM $CMAKE_CMD_ARGS \
|
common_run $CMAKE_PROGRAM $CMAKE_CMD_ARGS \
|
||||||
-DANDROID_ABI=$ARCH \
|
-DANDROID_ABI=$ARCH \
|
||||||
-DCMAKE_INSTALL_PREFIX=$BUILD_DST/$ARCH \
|
-DCMAKE_INSTALL_PREFIX=$BUILD_DST/$ARCH \
|
||||||
-DCMAKE_INSTALL_LIBDIR=. \
|
-DCMAKE_INSTALL_LIBDIR=. \
|
||||||
$SRC_DIR
|
$SRC_DIR
|
||||||
echo $(pwd)
|
echo $(pwd)
|
||||||
common_run cmake --build . --target install
|
common_run $CMAKE_PROGRAM --build . --target install
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue