Add build script
This commit is contained in:
parent
ea905b0c0b
commit
7a8bdb0cca
1 changed files with 20 additions and 0 deletions
20
build.sh
Executable file
20
build.sh
Executable file
|
@ -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"
|
Loading…
Add table
Reference in a new issue