summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2020-06-27 02:00:58 -0400
committerRyan C. Gordon <icculus@icculus.org>2020-06-27 02:00:58 -0400
commitda30235d4472f6561a37961a6dffaf54ab544a9c (patch)
tree63c3b116893849e649a68d0cfac078045651ece6 /CMakeLists.txt
parent2af677b9e2795e473577ab8d2085e4cee24a374c (diff)
downloadsdl-da30235d4472f6561a37961a6dffaf54ab544a9c.tar.gz
cmake: Fix Metal detection on macOS/iOS.
Apparently the "-x objective-c" made it down to the linker, who then treats the .o file as Objective-C source code. Apparently the -ObjC argument does the same thing but gets ignored by the linker. Fixes Bugzilla #4988.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b703c34d2..33d505530 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1742,7 +1742,7 @@ elseif(APPLE)
if(VIDEO_VULKAN OR VIDEO_METAL OR RENDER_METAL)
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x objective-c")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -ObjC")
check_c_source_compiles("
#include <AvailabilityMacros.h>
#import <Metal/Metal.h>