Conversion to cmake