mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-30 22:01:04 +02:00
Fix Metal GPU backend not being included in CMake configuration
Fixes #15285 Missing Metal GPU block in CMakeLists.txt prevents `HAVE_SDL_GPU` from being set when only Metal is enabled.
This commit is contained in:
@@ -2735,13 +2735,6 @@ elseif(APPLE)
|
||||
set(SDL_VIDEO_RENDER_METAL 1)
|
||||
set(HAVE_RENDER_METAL TRUE)
|
||||
endif()
|
||||
if (SDL_GPU)
|
||||
set(SDL_GPU_METAL 1)
|
||||
sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.m"
|
||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.h"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -3554,6 +3547,14 @@ if(SDL_GPU)
|
||||
set(SDL_GPU_VULKAN 1)
|
||||
set(HAVE_SDL_GPU TRUE)
|
||||
endif()
|
||||
if(SDL_VIDEO_METAL)
|
||||
sdl_glob_sources(
|
||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.m"
|
||||
"${SDL3_SOURCE_DIR}/src/gpu/metal/*.h"
|
||||
)
|
||||
set(SDL_GPU_METAL 1)
|
||||
set(HAVE_SDL_GPU TRUE)
|
||||
endif()
|
||||
if(SDL_RENDER_GPU AND HAVE_SDL_GPU)
|
||||
set(SDL_VIDEO_RENDER_GPU 1)
|
||||
set(HAVE_RENDER_GPU TRUE)
|
||||
|
||||
Reference in New Issue
Block a user