1
0
mirror of https://github.com/ssloy/tinyraycaster.git synced 2025-01-16 20:58:23 +01:00

Buildscripts - Because we like fast interations while also over-engineering solutions

This commit is contained in:
Paul N. Baker 2019-02-11 14:09:50 -07:00
parent 5ca8d380bd
commit d4563c5281

25
build.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e
BUILD_DIR="build"
BUILD_BIN="tinyraycaster"
# Take care of dependencies
if [ "$(uname)" == "Darwin" ]; then
if brew help >/dev/null && ! brew list sdl2 >/dev/null 2>&1 ; then
brew install sdl2
fi
elif [ "$(uname)" == "Linux" ]; then
# Ubuntu/Debian
if [ -f /etc/lsb-release ] && ! dpkg -l libsdl2-dev >/dev/null ; then
sudo apt install -y libsdl2-dev
fi
fi
# Build the project and run it
if [ ! -d "${BUILD_DIR}" ]; then
mkdir "${BUILD_DIR}"
fi
cd "${BUILD_DIR}"
cmake ..
make
"./${BUILD_BIN}"