The only way that would work would be to create a huge hollow building with a gigantic pendulum in the middle of it, and if the earthquake were violent enough, anything that is built into the walls gets destroyed by the pendulum anyway.
It's not a practical design.
It's not a practical design.