Move the patch command into the update command. Apparently UPDATE and PATCH are run at the same time in cmake.