1 year ago
#72264
Adamski
Xcode 13 dependency targets not being built or not found
I have an Xcode iOS project, generated from CMake, consisting of a few targets with a dependency tree like this:
- Target A
- Target B
- Target C - depends on A and B
- Target D - depends on C
A, B and C produce static libraries. D is an executable app target.
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.
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.
The only way to make this work is to run xcodebuild
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!
I'm on macOS 12.0.1 and Xcode 13.2.1
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.
ios
xcode
macos-monterey
0 Answers
Your Answer