#!/bin/bash
mkdir build
cd build

CMAKE_GENERATOR="Unix Makefiles"
CMAKE_ARCH="-m"$ARCH

if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
  export CFLAGS="$CFLAGS $CMAKE_ARCH"
  export LDLAGS="$LDLAGS $CMAKE_ARCH"
fi

cmake .. -G"$CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_apps:BOOL=OFF \
-DWITH_DOCS:BOOL=OFF \
-DWITH_TUTORIALS:BOOL=OFF \
-DBUILD_tools:BOOL=OFF \
-DBUILD_OPENNI2:BOOL=OFF \
-DBUILD_examples:BOOL=OFF \
-DBUILD_global_tests:BOOL=OFF \
-DWITH_CUDA:BOOL=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_OpenNI:BOOL=TRUE \
-DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=TRUE \
-DCMAKE_DISABLE_FIND_PACKAGE_VTK:BOOL=TRUE \
-DBUILD_simulation:BOOL=AUTO_OFF \
-DBUILD_outofcore:BOOL=AUTO_OFF \
-DBUILD_people:BOOL=AUTO_OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX=$PREFIX

make
make install
