aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: c98285e2ffafa514a0997141c26c0e57faa700b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 -DLOCAL_INSTALL=ON -DCMAKE_BUILD_TYPE=Debug
  $BUILD_COMMAND
)