#!/bin/bash

export PATH="$PATH:/Applications/CMake.app/Contents/bin/"

cd $(dirname $0)/..
ROOT=$(pwd)

mkdir "build"
cd build
BUILD=$(pwd)

build-env()
{
	cd $BUILD
	mkdir "$1"
	cd "$1"
	cmake "$ROOT" -G "$2"
}

if [[ $(uname) == MINGW* ]]
then
	build-env "Make" "MinGW Makefiles"
	build-env "SublimeText" "Sublime Text 2 - MinGW Makefiles"
	build-env "VisualStudio" "Visual Studio 12 2013"
else
	build-env "SublimeText" "Sublime Text 2 - Unix Makefiles"
	build-env "Make" "Unix Makefiles"
	build-env "Xcode" "Xcode"
fi