We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5099

Summary: Invalid C functions in iOS CMake build
Product: SDL Reporter: Steve Robinson <ssrobins>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.12   
Hardware: iPhone/iPod touch   
OS: iOS (All)   
Attachments: Patch for include/SDL_config.h.cmake

Description Steve Robinson 2020-04-19 06:50:04 UTC
Created attachment 4312 [details]
Patch for include/SDL_config.h.cmake

Various C functions are 'found' during CMake config when building for iOS, but they don't actually exist, leading to build errors. 

SDL uses CMake's CheckFunctionExists function, but CMake's documentation recommends using CheckSymbolExists to get around various limitations:
https://cmake.org/cmake/help/v3.17/module/CheckFunctionExists.html

In the meantime, I've attached a patch that comments out all the problem functions in include/SDL_config.h.cmake so the generated file builds fine on iOS, while not affecting other platforms.

Environment:
CMake: 3.17.1
Xcode: 11.4.1
macOS: 10.15.4
Comment 1 Steve Robinson 2020-12-25 08:02:21 UTC
Fixed in SDL 2.0.14, thanks!