Open paulocoutinhox opened 1 year ago
Also, CMake guys sad that the flag CMAKE_XCODE_EFFECTIVE_PLATFORMS don't exists.
https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake#L487
The thread is here: https://gitlab.kitware.com/cmake/cmake/-/issues/24650#note_1347059
If you use -G xcode
in the generate cmake config command, the source code internally will be compiled using -target x86_64-apple-Macos10.15
. If -G xcode
is not used, will use -target x86_64-apple-ios13.1-macabi
. Since the CMakeLists.txt of my project is configured with many Xcode-related properties, I need to compile the source code using the project generated by XCode.
After generating the XCode project, at the build stage I used the command xcodebuild-configuration Release-parallelizeTargets -jobs 2 ARCHS=x86_64 -sdk macosx SUPPORTS_MAC_CATALYST=YES -project myproject.xcodeproj -scheme myproject -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst'
to generate the maccatalyst framework, This command uses -target x86_64-apple-ios13.1-macabi
internally. You get the same effect as not use -G xcode
.
Having the same issue here, would like to use Xcode generator e.g. for module map generation, however for Maccatalyst target hitting this issue. Any ideas why/how to get target selected for maccatalyst?
I think I have the same issue. I generate framework .xcodeproject with CMake and use it in big app when debugging. It is the only way to debug for me. For now I can add Mac(Catalyst) platform manually. Building without '-G Xcode' works good, thanks for your work !
This is pretty important because frameworks built using standard CMake Makefiles will not pass app store review for lack of certain properties like MinimumSystemVersion, etc. This can be worked around by using "custom Info.plist" but the Xcode target will do all of this automatically.
Hi,
Im trying build for mac catalyst with x86_64 arch, but it "understand" that is for macOS:
But the compilation line generated is:
You can see that it is using:
The CMake log: