Add script to build the project manually

This commit is contained in:
ItsDrike 2024-12-01 01:10:43 +01:00
parent 9762d7d566
commit bfa876f87f
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

20
build.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
set -euo pipefail
BUILD_DIR="build/Desktop-Debug"
BIN_NAME="appSolitare"
if [ -d "$BUILD_DIR" ]; then
echo "Cleaning the build directory..."
rm -rf "$BUILD_DIR"
fi
echo "Configuring project..."
mkdir -p "$BUILD_DIR"
cmake -S . -B "$BUILD_DIR"
echo "Building..."
cmake --build "$BUILD_DIR" --target all
echo "Running..."
"$BUILD_DIR"/"$BIN_NAME"