Hello, I just upgraded to 2.0.16 and when I try to load my vulkan dynamic library from SDL2, I have this message :
Vulkan support is either not configured in SDL or not available in current SDL video driver (cocoa) or platform
After investigation, it seems that even if I chose the options VIDEO_VULKAN and VIDEO_METAL, CMake configuration has disabled them (set to 0).
VIDEO_COCOA (Wanted: ON): ON
VIDEO_DIRECTFB (Wanted: OFF): OFF
VIDEO_DUMMY (Wanted: ON): ON
VIDEO_KMSDRM (Wanted: OFF): OFF
VIDEO_METAL (Wanted: 0): OFF
VIDEO_OFFSCREEN (Wanted: OFF): OFF
VIDEO_OPENGL (Wanted: ON): ON
VIDEO_OPENGLES (Wanted: ON): ON
VIDEO_RPI (Wanted: OFF): OFF
VIDEO_VIVANTE (Wanted: OFF): OFF
VIDEO_VULKAN (Wanted: 0): OFF
I saw the only way to be disabled is if we fail the compilation test which includes <Metal/Metal.h>.
#include <AvailabilityMacros.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
#if (!TARGET_CPU_X86_64 && !TARGET_CPU_ARM64)
#error Metal doesn't work on this configuration
#endif
int main()
{
return 0;
}
I tried the same snippet in XCode, I just had to name my file main.mm because of Objective-C references but it compiles correctly. What could be the issue?
My environment :
- macOS Big Sur 11.4
- XCode 12.5.1
- SDL 2.0.16
- CMake 3.21.1