BuildSystem: Download cmake only if needed

This commit is contained in:
Bananymous 2023-12-28 19:50:22 +02:00
parent 4307968182
commit 93a72ebd06
1 changed files with 10 additions and 2 deletions

View File

@ -16,10 +16,18 @@ download_cmake() {
CMAKE_FULL_NAME="cmake-3.26.6-linux-x86_64"
mkdir -p $BANAN_BUILD_DIR/toolchain
mkdir -p $BANAN_TOOLCHAIN_PREFIX/bin
mkdir -p $BANAN_TOOLCHAIN_PREFIX/share
cd $BANAN_BUILD_DIR/toolchain
if ! [[ -f $CMAKE_FULL_NAME.tar.gz ]]; then
wget https://cmake.org/files/v3.26/$CMAKE_FULL_NAME.tar.gz
fi
if ! [[ -d $CMAKE_FULL_NAME ]]; then
tar xf $CMAKE_FULL_NAME.tar.gz
fi
cp -r $CMAKE_FULL_NAME/bin/* $BANAN_TOOLCHAIN_PREFIX/bin/
cp -r $CMAKE_FULL_NAME/share/* $BANAN_TOOLCHAIN_PREFIX/share/