Switch from autotools to cmake