The Bash FAQ to the rescue: The quotes are syntactical (meaning the quotes are not part of the name), so you should get the expected result with this:
if test [.... this is Unix ...]
target="Unix Makefiles"
else
target="MSYS Makefiles"
fi
cmake . -G "$target"
PS: eval is evil