Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

16
tools/autobuild/detect_cmake.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e -u
# If CMAKE variable is set, use it
[ -n "${CMAKE-}" -a -x "${CMAKE-}" ] && return 0
# Find cmake, prefer cmake3
for name in cmake3 cmake; do
if command -v "$name" > /dev/null; then
CMAKE="$name"
return 0
fi
done
echo 'Error: cmake is not installed.' >&2
exit 1

View file

@ -0,0 +1,46 @@
set -e -u
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
# Echoes found NDK root path or nothing if not found
# return 1 on error and 0 on success
GetNdkRoot()
{
local FILENAME="$MY_PATH/../../android/local.properties"
while read line
do
if [[ "${line:0:7}" == "ndk.dir" ]]; then
echo "${line:8}"
return 0
fi
done < $FILENAME
# Not found in local.properties, try to find using ANDROID_HOME.
local NDK_VERSION="`( ls -1 "${ANDROID_HOME}/ndk" | sort | tail -1 )`"
if [ ! -z "$NDK_VERSION" ]
then
echo "$ANDROID_HOME/ndk/$NDK_VERSION"
return 0
fi
return 1
}
GetNdkHost()
{
if [[ "${OSTYPE:0:5}" == "linux" ]]; then
echo "linux-x86_64"
return 0
fi
if [[ "${OSTYPE:0:6}" == "darwin" ]]; then
echo "darwin-x86_64"
return 0
fi
if [[ "$OSTYPE" == "cygwin" ]]; then
echo windows-x86_64
return 0
fi
echo "ERROR: Can't detect your host OS"
return 1
}