#!/bin/bash
set -e

tmpdir=$(mktemp -d)
trap "rm -rf $tmpdir" EXIT

echo
echo '8<------- snip ----------------'
tee "$tmpdir/example.idl" << EOF
struct HelloWorld
{
	unsigned long index;
	string message;
};
EOF
echo '8<------- snip ----------------'
echo

cd "$tmpdir"
mkdir out
echo '$' fastddsgen -example CMake -d out example.idl
fastddsgen -example CMake -d out example.idl
echo '$' ls -R out
ls -R out
echo
echo '8<------- snip ----------------'
cat out/CMakeLists.txt
echo '8<------- snip ----------------'

exit 0 # TODO: need to package fastrtsp for an actual build test
mkdir build
cd build
echo '$' cmake ../out
cmake ../out
make VERBOSE=ON
