From 471d3c363e654c7ad10782f50cb47e639c0646c3 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 27 Dec 2020 14:00:30 +0300 Subject: [PATCH] fix bug #5415 -- fatal error: 'Cocoa/Cocoa.h' file not found in iOS build --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0a01ca56..7a29d0f4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1670,7 +1670,11 @@ elseif(APPLE) message_error("SDL_FILE must be enabled to build on MacOS X") endif() - file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) + if(IOS OR TVOS) + file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m) + else() + file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) + endif() set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES}) set(HAVE_SDL_MISC TRUE)