A Gamma-convergence approach to the Cahn–Hilliard equation