[Commits] SDL: Fixed bug 3786 - building against a Mac OS X SDK < 10.11 fa...

libsdl.org revision control commits-owner at libsdl.org
Mon Aug 28 22:13:49 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/ff9e8ae4d4fb
changeset: 11407:ff9e8ae4d4fb
user:      Sam Lantinga <slouken at libsdl.org>
date:      Mon Aug 28 22:13:45 2017 -0700
description:
Fixed bug 3786 - building against a Mac OS X SDK < 10.11 fails since the vulkan merge

Ozkan Sezer

Since the Vulkan merge, building against a Mac OS X SDM older than
10.11 fails in SDL_cocoametalview.m because Metal.framework is not
present. There is no conditional compiling in SDL_cocoametalview.m
either, so --disable-video-vulkan doesn't help with anything. (The
configury doesn't check darwin for x86_64 either, but it's another
story.)

I cross-build against 10.8 SDK on linux using clang-3.4.2 and this
is a problem for me.  Will this be fixed?

diffstat:

 src/video/cocoa/SDL_cocoametalview.h |  4 ++++
 src/video/cocoa/SDL_cocoametalview.m |  5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r f40c2dedaded -r ff9e8ae4d4fb src/video/cocoa/SDL_cocoametalview.h
--- a/src/video/cocoa/SDL_cocoametalview.h	Mon Aug 28 21:42:39 2017 -0700
+++ b/src/video/cocoa/SDL_cocoametalview.h	Mon Aug 28 22:13:45 2017 -0700
@@ -32,6 +32,8 @@
 #import "../SDL_sysvideo.h"
 #import "SDL_cocoawindow.h"
 
+#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA
+
 #import <Cocoa/Cocoa.h>
 #import <Metal/Metal.h>
 #import <QuartzCore/CAMetalLayer.h>
@@ -55,6 +57,8 @@
 
 void Cocoa_Mtl_GetDrawableSize(SDL_Window * window, int * w, int * h);
 
+#endif /* SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA */
+
 #endif /* SDL_cocoametalview_h_ */
 
 /* vi: set ts=4 sw=4 expandtab: */
diff -r f40c2dedaded -r ff9e8ae4d4fb src/video/cocoa/SDL_cocoametalview.m
--- a/src/video/cocoa/SDL_cocoametalview.m	Mon Aug 28 21:42:39 2017 -0700
+++ b/src/video/cocoa/SDL_cocoametalview.m	Mon Aug 28 22:13:45 2017 -0700
@@ -28,6 +28,8 @@
 
 #import "SDL_cocoametalview.h"
 
+#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA
+
 #include "SDL_assert.h"
 #include "SDL_loadso.h"
 #include <dlfcn.h>
@@ -116,5 +118,6 @@
     }
 }
 
+#endif /* SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA */
+
 /* vi: set ts=4 sw=4 expandtab: */
-


More information about the commits mailing list