cmake: SDL2 target is not always available

This commit is contained in:
Anonymous Maarten
2024-08-04 15:52:16 +02:00
parent 230f1debd0
commit 7cf3234efe

View File

@@ -3548,7 +3548,10 @@ if(SDL_TEST)
endif()
if(MSVC AND NOT SDL_LIBC)
set(targets SDL2)
set(targets )
if(TARGET SDL2)
list(APPEND targets SDL2)
endif()
if(TARGET SDL2-static)
list(APPEND targets SDL2-static)
endif()