cmake/sdlchecks.cmake
changeset 8244 bfea1a568a0a
parent 8159 427e8fdf6f69
child 8991 13b0df1793e8
--- a/cmake/sdlchecks.cmake	Sat Feb 22 21:21:33 2014 -0500
+++ b/cmake/sdlchecks.cmake	Sun Feb 23 01:10:33 2014 -0500
@@ -556,9 +556,9 @@
 #
 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)