Преглед изворни кода

CMake: Just assume Apple platforms have Cocoa support.

Fixes Bugzilla #2056.
Ryan C. Gordon пре 11 година
родитељ
комит
295acea953
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      cmake/sdlchecks.cmake

+ 3 - 3
cmake/sdlchecks.cmake

@@ -556,9 +556,9 @@ endmacro(CheckWayland)
 #
 macro(CheckCOCOA)
   if(VIDEO_COCOA)
-    check_objc_source_compiles("
-        #import <Cocoa/Cocoa.h>
-        int main (int argc, char** argv) {}" HAVE_VIDEO_COCOA)
+    if(APPLE) # Apple always has Cocoa.
+      set(HAVE_VIDEO_COCOA TRUE)
+    endif(APPLE)
     if(HAVE_VIDEO_COCOA)
       file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
       set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C)