mirror of https://github.com/libsdl-org/SDL.git
cmake: make sure a SDL3 library is present when not using COMPONENTs
This commit is contained in:
parent
8a7beca122
commit
cbdc93b17f
|
|
@ -77,6 +77,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
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)
|
check_required_components(SDL3)
|
||||||
|
|
||||||
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
|
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
|
||||||
|
|
@ -93,7 +96,7 @@ endfunction()
|
||||||
if(NOT TARGET SDL3::SDL3)
|
if(NOT TARGET SDL3::SDL3)
|
||||||
if(TARGET SDL3::SDL3-shared)
|
if(TARGET SDL3::SDL3-shared)
|
||||||
_sdl_create_target_alias_compat(SDL3::SDL3 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)
|
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-static)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue