mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
cmake: make sure a SDL3 library is present when not using COMPONENTs
This commit is contained in:
@@ -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()
|
||||||
|
Reference in New Issue
Block a user