tommath joins the cmake fun.

...at this point, mainly the internal stuff.