BuildSystem: Allow running custom version of cmake

You can now set the environment variable CMAKE_COMMAND to use custom
cmake version.
This commit is contained in:
2023-12-27 12:55:32 +02:00
parent 87272f0cd7
commit af80bad87a
2 changed files with 7 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ make_build_dir () {
mkdir -p $BANAN_BUILD_DIR
cd $BANAN_BUILD_DIR
if ! [[ -f "build.ninja" ]]; then
cmake --toolchain=$BANAN_TOOLCHAIN_DIR/Toolchain.txt -G Ninja $BANAN_ROOT_DIR
$CMAKE_COMMAND --toolchain=$BANAN_TOOLCHAIN_DIR/Toolchain.txt -G Ninja $BANAN_ROOT_DIR
fi
}
@@ -66,6 +66,10 @@ if [[ $# -eq 0 ]]; then
exit 1
fi
if [[ -z $CMAKE_COMMAND ]]; then
export CMAKE_COMMAND=cmake
fi
case $1 in
toolchain)
build_toolchain