We study the effect of finite system size on the tension tau of a three-phase contact line. This is especially important in systems with forces that are sufficiently long-ranged for tau to diverge in the thermodynamic limit. Near wetting phase transitions we propose an anisotropic finite-size scaling hypothesis, which takes into account the effect of thermal capillary-wave fluctuations. The singular behaviour of tau near a first-order wetting transition is analyzed. Scaling functions are calculated explicitly in the mean-field regime, which includes the physically most common systems with van der Waals forces in dimension d = 3.