changes to allow port numbers to be configured in cmake