Migrate build system to cmake.

Here's hoping!