If the aim is to simply keep a weather tight seal under regular service conditions, but allow the buildings to move independently in the event of an earthquake, then it just requires designing in a structural fuse (a weak point in the link between the buildings) that doesn't result in the collapse of the bridge. The structural supports will need to be able to move enough to accommodate the expected relative displacement of the buildings, without moving off of the what they bear on.
If you want it survive the earthquake and still be weathertight afterwards, things get much more difficult (and expensive). For that, you'll need some sort of expansion joint, such as an anchored elastomeric seal.