aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..b69687c
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+set -e
+
+mkdir -p build
+
+if [ -f "/usr/bin/ninja" ] ; then
+ EXTRA_ARGS="-G Ninja"
+ BUILD_COMMAND="ninja"
+else
+ BUILD_COMMAND="make"
+fi
+
+echo "Using $BUILD_COMMAND to build"
+(
+ cd build
+ cmake .. $EXTRA_ARGS -DCMAKE_INSTALL_PREFIX=../../install -DCMAKE_BUILD_TYPE=Debug
+ $BUILD_COMMAND
+)