title: Xcode 13 dependency targets not being built or not found
body: <p>I have an Xcode iOS project, generated from CMake, consisting of a few targets with a dependency tree like this:</p>
  <ul>
  <li>Target A</li>
  <li>Target B</li>
  <li>Target C - depends on A and B</li>
  <li>Target D - depends on C</li>
  </ul>
  <p>A, B and C produce static libraries. D is an executable app target.</p>
  <p>Everything looks correct in the Build Phases. However, when I build Target D, I get linker errors due to the missing static libraries for A, B and C. Looking at the Build Products Path for each of the dependencies, I can see that they have not been created in the expected location.</p>
  <p>I can go into each target and build it in Xcode, after which I see a Build Succeeded message, but alas, nothing appears in the target's Build Products Path.</p>
  <p>The only way to make this work is to run <code>xcodebuild</code> on the command line for each of the targets. This is not ideal, as it means I cannot work on the codebase as one project - I have to manually build the modified target to test it in the executable. The odd thing is I am getting build errors for the targets in Xcode, so something is getting compiled, but I don't know where!</p>
  <p>I'm on macOS 12.0.1 and Xcode 13.2.1</p>
  <p>Note that the same CMake project when built for macOS directly via CLion builds fine - the issue seems to be with the generated Xcode project.</p>