in terms of grammar, both sentences are ok. but the two sentences emphasize different points.
i'll put these two sentences in dialogues of English so that you can get a better understanding.
-Where's the library?
-The library is in front of the dorm.
(This is probably what you want in your case, emphasizes the location of the library-WHERE)
-What's in front of the dorm?
-The library (is in front of the dorm).
(Emphasizes it is the library that lies in front of the dorm-WHAT)
-native speaker here, hope this help :)