Combining loft and sweep

 From:  Involute
8537.1 
I'd like to create a hollow tube that follows a curve and morphs from a rectangle at one end to a circle at the other. I could place cross-sections along the curve and invoke loft, but it's tricky getting the placement and orientations right. A combination of loft and sweep would be perfect. Is there such a thing?