Switch to a CMake build system