From 7a8bdb0cca103787fb45234021fbda7e86a6a54c Mon Sep 17 00:00:00 2001 From: ItsDrike <itsdrike@protonmail.com> Date: Tue, 11 Mar 2025 12:36:13 +0100 Subject: [PATCH] Add build script --- build.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..96da855 --- /dev/null +++ b/build.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -euo pipefail + +BUILD_DIR="build/Desktop-Debug" +BIN_NAME="sprites" + +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"