Migrate to cmake building system