solitare/build.sh

21 lines
366 B
Bash
Raw Permalink Normal View History

#!/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"