I’ve tried this again.
This time i managed get the toolchain running with the cmake gui, by adding the toolchain file in the configure step for cross compilation.
I still have some issues with the required code signing since it doesn’t seem to find my provisioning profile in the Library profile cache path and I somehow can’t find a cmake option for automatic manage signing (which i would use for the non cmake project)
This above seems not to work for the provisioning profile, therefore I currently have to manually tick Automatic signing everytime I execute cmake, which is really annoying. If anyone has knows how to handle the code signing stuff please help
Additionally I have some issues with adding external frameworks like SDKBOX to the project via cmake.
I’ve tried to play around with t target_link_libraries but it somehow doesn’t find the .framework.
Let me know if anyone has any idea of those 2 issues.
@R101 Yeah i already used this post for my Android project, but not 100% sure if this gonna work for iOS ans mentioned I already had issues with finding the sdkbox.framework
I’ve tried to use the find_library and add library stuff for the .framework files from sdkbox
for example the sdkbox stuff is in the .proj.ios_mac src folder:
I’ve even tried to find one of the frameworks in the Library/Frameworks folder and it doesn’t find them.
Not sure if the CMake version is an issue? I’m on 3.13.1
ok, I’m now able to find libs from the /Library/Frameworks folder, but there are still some issues with the custom project folder, but for now i’ve just moved the 2 frameworks into the Library/Frameworks folder and it works.
But now I get the issue I had with directly adding the sdkbox.framework/sdkbox file
ok, i thought I only had to add the sdkbox and iap frameworks , since i did the same with the non cmake project, but it seems like you manually have to add the SystemConfiguration and StoreKit framework:
For the running app I’ve still got an issue. For some reason on my iPad the game is displayed with a smaller width and height for some reason.
For example i have a iPad mini 2 and the GLView assigns a screen size 1334 x 750 to it for the CMake project. for the non Cmake project it uses the 2048 x 1536, are this some CMake settings?
CMake scripts didn’t change any C++ code files, for iOS project, I think the only part may have effects on it is iOS info.plist files, this file is different from non CMake project.
when you generate an iOS Xcode project, you can compare the difference. For CMake, the info.plist come from a template with some values changed.
is it actually possible have both, osx and ios in one xcode project, similar to the non cmake project provided by default? as far as i know there you just have schemes for each platform.
Also…
Not sure if I read this somewhere on the forums before, but is it actually generally a good advice to use cmake for ios? For me it’s the first time using it for mobile products. For desktop (even osx for dev only) its awesome and for Android its also great since you still have to do the configuration in Android Studio (signing and settings, so cmake only somewhat replaces the .mk files), but for iOS it’s not that easy to work with, unlike for Android, CMake generates the whole project setup for XCode, like code signing is already a problem for me right now(as mentiond above with enabling automatic signing) and I guess making the product release read with additional app resource which you can set through XCode might be not so easy?
As already mentioned I think someone in the forums already made this point for CMake on iOS.
For fast development itself (where I don’t care about shipping conrigurations etc) it still feals great tho.