Fix #5732 - change to cmake for build