We thoroughly discuss the layer deformations in smectic-A liquid crystals. The invariant elastic free energy is presented in terms of the derivatives of the vector field normal to layers and the change of the distance between the layers. We compare our results with the previous works of de Gennes and of Grinstein and Pelcovits. It is pointed out that anharmonic terms in the elastic free energy might be responsible for the change of the average layer spacing, layer spacing profile and in particular for the tilt profiles in finite smectic systems