cmake: make sure a SDL3 library is present when not using COMPONENTs

This commit is contained in:
Anonymous Maarten
2025-03-01 17:54:45 +01:00
parent 8a7beca122
commit cbdc93b17f

View File

@@ -77,6 +77,9 @@ else()
endif()
endif()
if(NOT SDL3_COMPONENTS AND NOT TARGET SDL3::Headers AND NOT TARGET SDL3::SDL3-shared AND NOT TARGET SDL3::SDL3-static)
set(SDL3_FOUND FALSE)
endif()
check_required_components(SDL3)
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
@@ -93,7 +96,7 @@ endfunction()
if(NOT TARGET SDL3::SDL3)
if(TARGET SDL3::SDL3-shared)
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
else()
elseif(TARGET SDL3::SDL3-static)
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-static)
endif()
endif()