#!/usr/bin/env bash

VERSION=$1
VERSION_ARRAY=( ${VERSION//./ } )
MAJOR=${VERSION_ARRAY[0]}
MINOR=${VERSION_ARRAY[1]}
REVISION=${VERSION_ARRAY[2]}

cat <<EOF
#pragma once
#define DREAL_VERSION_STRING  "${VERSION}"
#define DREAL_VERSION_FULL     ${VERSION}
#define DREAL_VERSION_MAJOR    ${MAJOR}
#define DREAL_VERSION_MINOR    ${MINOR}
#define DREAL_VERSION_REVISION ${REVISION}
EOF
