CMake 3.19 iOS build breakage (after upgrading from 3.18)
Hello CMake development team,
After upgrading CMake from 3.18 -> 3.19, we have observed a regression in how our iOS project is being configured & built.
In CMake 3.18 inclusion of system libraries was done (correctly) like this:
-framework CoreFoundation
while CMake 3.19 does it like this:
-F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks -framework CoreFoundation
This means that the generated project can't be used for both simulator and device SDK builds, which used to be the case for CMake 3.18. This represents a significant loss in usability and functionality.
This regression manifests itself in two ways:
-
In the XCode UI, if you switch from physical device to simulator (or vice versa), the system libraries will be skipped since they are from the wrong (forced) SDK path and the linker part of the build will show unresolved symbols.
-
On CI, since generated project file can not be used for both targets (device & simulator) anymore, the CI build fails for one or the other.
Thanks in advance for looking into this issue!
All the best, Milan