Switch to CMake; closes #1