aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: 173ff8c786be2ea990660b61b634e2b01734900f (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
  $BUILD_COMMAND
)