Switch to CMake, closing #1