Anchoring of a liquid crystal on a photoaligning layer with varying surface morphology