You are the first person I have ever heard make that claim. Mecca is almost a thousand miles from Jerusalem.
Could you be thinking of The Dome of the Rock?
The Second Temple was built on top of the First Temple. When the Second Temple was destroyed by the Romans in 70 CE, they also killed all the priests. That means that Jews can no longer enter the Temple Mount, because we might accidentally enter the inner sanctum. If you saw Raiders of the Lost Ark, you know how angry God gets when you enter the inner sanctum, or open the Ark... On a more serious side, it is a violation of the basic tenets of the religion.
So the Muslims built the Dome of the Rock in a place that Jews cannot go, and that is OK. If God choses to send a messiah to tell us where on the Temple Mount we can go, then he will also remove any impediments for us to go there. That is what he did when he sent messiahs to have us build the Second Temple.