Here’s one for future reference. I’ve been working with Xcode on and off recently, but today all of a sudden, Xcode decided that it couldn’t find any of the dependencies between the project’s apps and libraries. That is, when building Doomsday.app, it wouldn’t build any of the supporting libraries first which, of course, led to a failed build.
I’ve yet to find out what triggered this sudden malfunction. “Well, no matter” I thought, I’ll just regenerate the project using my handy script. No luck there! A project generated from scratch in an empty folder failed in the exact same fashion.
The current build configuration is set up to collect all the built binaries and other files into a single staging folder, where they are then bundled up into Doomsday.app. Turns out, if this intermediate folder is empty when qmake is run for the first time, it doesn’t set up the Xcode project dependencies — most likely because it can’t locate the files you’re supposed to be dependent on. A regular project clean doesn’t touch this custom staging folder, so as I initially wrote my script, this situation never occurred as I manually built all the components in the right order.
This is a real bummer since it means that to use the Xcode generator script you actually need to do the following:
- Run xcode_workspace.py in an empty build folder.
- In Xcode, manually build all the components in the correct order.
- Run the xcode_workspace.py script again so that qmake sets up the dependencies.
- Now you have a fully functional workspace.
For the record, this is all with Qt 5.3, so I’m keeping my fingers crossed that Qt 5.4 improves in the Xcode compatibility department. However, in the future I’m planning on migrating the project build system (back) to CMake (3+), which should yield better results.