Commit 45e3521d0dfd9be2b214d45ce9892e789683c9d4

Sam Lantinga 2020-12-09T07:32:10

Backed out changes for 5366 - cmake build doesn't detect Metal on macOS These changes introduce regressions for other build environments, so I'm backing them out until we sort out the correct fix.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c1550b..9f28958 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1802,7 +1802,7 @@ elseif(APPLE)
 
     if(VIDEO_VULKAN OR VIDEO_METAL OR RENDER_METAL)
       set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-      set(CMAKE_REQUIRED_FLAGS "-x objective-c ${CMAKE_REQUIRED_FLAGS}")
+      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -ObjC")
       check_c_source_compiles("
         #include <AvailabilityMacros.h>
         #import <Metal/Metal.h>