Better build dependency checking for outside projects.

TODO: this could easily be done in one big Xcode project.