Liquid-vapor transition from a microscopic theory: Beyond the Maxwell construction