cmake: fix SDL_RENDER_VULKAN reporting

Also fix an error when configuring with `-DSDL_VULKAN=ON
-DSDL_RENDER_VULKAN=FALSE`: the vulkan renderer is now correctly
disabled.
This commit is contained in:
Anonymous Maarten 2024-02-26 20:37:07 +01:00
parent 935c197059
commit 1f536a1e77
2 changed files with 6 additions and 1 deletions

View File

@ -2010,6 +2010,7 @@ elseif(WINDOWS)
set(HAVE_VULKAN TRUE)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
set(HAVE_RENDER_VULKAN TRUE)
endif()
endif()
endif()
@ -2254,6 +2255,7 @@ elseif(APPLE)
set(HAVE_VULKAN TRUE)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
set(HAVE_RENDER_VULKAN TRUE)
endif()
endif()
if(SDL_METAL)

View File

@ -725,7 +725,10 @@ macro(CheckVulkan)
if(SDL_VULKAN)
set(SDL_VIDEO_VULKAN 1)
set(HAVE_VULKAN TRUE)
set(SDL_VIDEO_RENDER_VULKAN 1)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
set(HAVE_RENDER_VULKAN TRUE)
endif()
endif()
endmacro()