Switch from autotools build to cmake build