From d3cc5764c0f66872a6b87c0ffbca66c85dccbea3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 18 Mar 2022 07:36:16 -0700 Subject: [PATCH] Modern CMake doesn't need "LANGUAGE C" for Objective-C CMake 3.19 fails to compile Objective-C with that property set Fixes https://github.com/libsdl-org/SDL/issues/5418 --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc2264a16..59bacf0f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1838,8 +1838,6 @@ elseif(APPLE) if(SDL_FILE) file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m) set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES}) - # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C. - set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C) set(HAVE_SDL_FILE TRUE) endif() @@ -1860,8 +1858,6 @@ elseif(APPLE) if(SDL_AUDIO) set(SDL_AUDIO_DRIVER_COREAUDIO 1) file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m) - # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C. - set_source_files_properties(${AUDIO_SOURCES} PROPERTIES LANGUAGE C) set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES}) set(HAVE_SDL_AUDIO TRUE) set(SDL_FRAMEWORK_COREAUDIO 1) @@ -1961,8 +1957,6 @@ elseif(APPLE) if(SDL_FILESYSTEM) set(SDL_FILESYSTEM_COCOA 1) file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m) - # !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C. - set_source_files_properties(${FILESYSTEM_SOURCES} PROPERTIES LANGUAGE C) set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) set(HAVE_SDL_FILESYSTEM TRUE) endif()