summaryrefslogtreecommitdiff
path: root/Xcode
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2020-12-01 13:50:42 -0800
committerSam Lantinga <slouken@libsdl.org>2020-12-01 13:50:42 -0800
commit00b551ba15195b8baa458f8d932a71f18e785022 (patch)
tree282aa77eacbbb18d5bab8e3fe31b1ffd9af42174 /Xcode
parent41dcce620879e9c1536c4c9ab2db23c96bdd21a2 (diff)
downloadsdl-00b551ba15195b8baa458f8d932a71f18e785022.tar.gz
Fixed bug 5366 - cmake build doesn't detect Metal on macOS
Tom Seddon This is as of commit 50d804ea729accf9e3a9ce83238d0a2976a17545 from https://github.com/SDL-mirror/SDL, which is HEAD as I write (apologies, not confident with Mercurial) # Config macOS: 10.14.6 (18G6042) cmake --version: cmake version 3.16.20200101-g23e782c clang --version: Apple clang version 11.0.0 (clang-1100.0.33.17) Xcode version: Version 11.3.1 (11C504) # Repro steps Run the following commands in the shell. cd /tmp/ git clone https://github.com/SDL-mirror/SDL mkdir build.SDL cd build.SDL cmake -G ../SDL/ Examine cmake output. # Expected result Metal is detected. # Actual result It appears that Metal is not detected! Note this line in the summary: -- RENDER_METAL (Wanted: 0): OFF # Fix Change check_c_source_compiles to check_objc_source_compiles. The cmake script tries to add -ObjC to the clang command line, but, for whatever reason, this doesn't seem to work. Change the test source to have an empty main. The "return 0;" line seems to confuse cmake somehow, causing it to crap out with an error about HAVE_FRAMEWORK_METAL being an unknown argument. (Maybe I'm just dense, but it's not obvious to me what the problem is here.) With these two changes: -- RENDER_METAL (Wanted: ON): ON Patch attached.
Diffstat (limited to 'Xcode')
0 files changed, 0 insertions, 0 deletions