move SDL2 cmake specifics

This commit is contained in:
scawful
2024-08-08 12:31:57 -04:00
parent 5b8541d28d
commit 94e62b01c4
2 changed files with 7 additions and 7 deletions

View File

@@ -3,4 +3,11 @@ if (UNIX)
add_subdirectory(src/lib/SDL)
else()
find_package(SDL2)
endif()
set(SDL_TARGETS SDL2::SDL2)
if(WIN32 OR MINGW)
list(PREPEND SDL_TARGETS SDL2::SDL2main ws2_32)
add_definitions(-DSDL_MAIN_HANDLED)
endif()