CMake: Just assume Apple platforms have Cocoa support.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 23 Feb 2014 01:10:33 -0500
changeset 8244 bfea1a568a0a
parent 8243 f905dd0f0f83
child 8245 2c63c27c4d1d
CMake: Just assume Apple platforms have Cocoa support. Fixes Bugzilla #2056.
cmake/sdlchecks.cmake
--- 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)