mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00: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.
(cherry picked from commit e66f1b5162)
This commit is contained in:
parent
2b6bee46b2
commit
3ae089e4de
1 changed files with 8 additions and 7 deletions
|
|
@ -2719,13 +2719,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()
|
||||
|
|
@ -3538,6 +3531,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue