Commit f4fc4719a5ed2efa76da32bbdcd6940b69c01422

ShuangLiu1992 2022-05-09T18:35:50

fix CheckCOCOA on modern CMake Modern CMake doesn't need "LANGUAGE C" for Objective-C set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C) should be removed fro video/cocoa/*.m as well otherwise project won't compile see also https://github.com/libsdl-org/SDL/commit/d3cc5764c0f66872a6b87c0ffbca66c85dccbea3

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index c7b4b88..de00593 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -711,7 +711,6 @@ macro(CheckCOCOA)
     endif()
     if(HAVE_COCOA)
       file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
-      set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C)
       set(SOURCE_FILES ${SOURCE_FILES} ${COCOA_SOURCES})
       set(SDL_VIDEO_DRIVER_COCOA 1)
       set(HAVE_SDL_VIDEO TRUE)