Ver código fonte

fix bug #5415 -- fatal error: 'Cocoa/Cocoa.h' file not found in iOS build

Ozkan Sezer 5 anos atrás
pai
commit
471d3c363e
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      CMakeLists.txt

+ 5 - 1
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)