I just can't get it to work on ios with cmake

Getting a boatload of problems, the main thing is that cmake seems to generate config files completely wrong.
In cmake there is something like if (IOS), I am not sure if that even gets triggered, what is meant to set it? Ok so I set it manually myself at the top of cmake, however nothing seems to really change.

The first problem is that SDL_VIDEO_DRIVER_UIKIT is never defined after generating the project, nor is any opengles support defines. The result is messageboxes don’t work, other stuff obviously fails too. If I copy and paste the SDL_config_iphoneos.h contents manually in my config file, xcode then proceeds to complain about a million reference counting errors (I have no idea how obj-c works with all that crap). Turning on automatic ref counting (arc) does nothing.

The actual cmake output is weird (I made another thread about this) where I request opengles support and it says WANTED ON but turns it off.

I just have a giant headache dealing with all this, I just wish someone could say, is the cmake script actually usable on ios? I really need to get my work done and right now im just sitting here drinking myself to sleep.

I don’t believe iOS is supported with CMake currently.

The Xcode project in Xcode-iOS/SDL/ is the best way to build SDL for iOS - you can use the ‘xcodebuild’ command in a Terminal or a shell script if you don’t want to use Xcode’s UI.

1 Like

Yes, @slime is right, the correct way to build this right now is with the existing iOS-specific Xcode project. That being said, fixing obvious bugs in the CMake project is always worthwhile. Don’t be afraid to file these at https://bugzilla.libsdl.org/ if you haven’t so we don’t forget to dig into this!