Soft-bodied robots, due to their intrinsic compliance, have shown great potential for operating within unstructured environment and interacting with unknown objects. This paper deals with automatic design and fabrication of soft robots. From a structure point of view, we synthesize a soft cable-driven gripper by recasting its mechanical design as a topology optimization problem. Building on previous work on compliant mechanism optimization, we model the interactions between the gripper and objects more practically, in form of pressure loadings and friction tractions, and further, we investigate how the interaction uncertainties affect the optimization solution by varying the contact location and area. The optimized soft fingers were 3D printed and then assembled to build a gripper. The experiments show that the gripper can handle a large range of unknown objects of different shapes and weights (up to 1 kilogram), with different grasping modes. This work represents an important step toward leveraging the full potential of the freeform design space to generate novel soft-bodied robots.