cmake: make sure SDL2::SDL2 is always available

This commit is contained in:
Anonymous Maarten authored and Sam Lantinga committed 2022-06-14 20:15:34 -07:00
1 parent 69df26a0d4
commit 6d1dfc8322
3 files changed
+23 -5

No files matched your search

+5
View File
@@ -3194,3 +3194,8 @@ endif()
##### Fix Objective C builds #####
set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${CMAKE_C_FLAGS}")
# Make sure SDL2::SDL2 always exists
if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 ALIAS SDL2-static)
endif()