#!/bin/bash

BUILD_DIR_PREFIX="build_"
BUILD_TYPE="Release"
#BUILD_TYPE="Debug"
PWD=`pwd`

PLATFORM_DIR="vienna"
PLATFORM_TYPE=SCHUBERT
CMAKE_TOOLCHAIN_FILE=devel_vienna_toolchain.cmake

BUILD_DIR=${BUILD_DIR_PREFIX}${PLATFORM_DIR}

rm ${BUILD_DIR} lib/${PLATFORM_DIR} -rf
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
	-DPLATFORM_TYPE=${PLATFORM_TYPE} \
	-DSDK_TYPE=SDK_IPCAMERA \
	-DCMAKE_TOOLCHAIN_FILE=../../cmake/${CMAKE_TOOLCHAIN_FILE}
make -j4
make install
cd ${PWD}
