Skip to content

Mac: VIDEO_METAL/VIDEO_VULKAN options cannot be enabled using CMake #3547

@SDLBugzilla

Description

@SDLBugzilla

This bug report was migrated from our old Bugzilla tracker.

Reported in version: don't know
Reported for operating system, platform: macOS 10.15, x86_64

Comments on the original bug report:

On 2020-02-16 13:31:54 +0000, wrote:

I am trying to build the latest source from the default branch and I am using MacOS Catalina version 10.15.3 (19D76).

Compiling SDL2 using CMake and setting options VIDEO_METAL/VIDEO_VULKAN to ON fails to enable them. Building SDL2 2.0.10 from source works correctly and Metal/Vulkan support is enabled.

The relevant output I get from CMake is the following:
-- Performing Test HAVE_FRAMEWORK_METAL
-- Performing Test HAVE_FRAMEWORK_METAL - Failed

-- VIDEO_METAL (Wanted: 0): OFF
-- VIDEO_VULKAN (Wanted: 0): OFF

When using /.configure, I think it works correctly although I have not tried to build and link against it because I can see it print the following at the end:

Video drivers : dummy cocoa metal opengl opengl_es2 vulkan

I believe I have tracked the issue to potentially this line and commit: https://hg.libsdl.org/SDL/rev/b87ba0fad17e#l1.44

My assumption is that check_c_source_compiles() fails to compile the provided input because it is an objective-c source (for example using #import)and not a c source.

On 2020-06-27 06:03:39 +0000, Ryan C. Gordon wrote:

This is fixed in https://hg.libsdl.org/SDL/rev/e7828d3a7576

--ryan.

On 2020-09-15 02:04:44 +0000, wrote:

*** Bug 5204 has been marked as a duplicate of this bug. ***

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions