| Summary: | iOS-specific main sources not used for CMake build. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Aaron Barany <akb825> |
| Component: | main | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | 2.0.14 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS 11 | ||
| Attachments: | sdl-ios-fix.patch | ||
Can you provide a tested patch? Thanks! Created attachment 4703 [details]
sdl-ios-fix.patch
I've attached the patch I'm using to fix the iOS build. The fix for the main library was integrated into a separate patch for fixing the misc sources that was posted on another bug.
Patch added, thanks! https://hg.libsdl.org/SDL/rev/399606b401c9 |
The CMake build for SDL doesn't set SDLMAIN_SOURCES on iOS to the sources in src/main/ios. As a result, SDL fails to initialize since it falls back to the dummy main. Adding the line file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/uikit/*.c) fixes the issue.