Commit adf70586 authored by Rolf Eike Beer's avatar Rolf Eike Beer

FindSDL: add SDLMAIN_LIBRARY only once (#13262)

parent eb8b0bea
......@@ -133,10 +133,12 @@ endif()
if(SDL_LIBRARY_TEMP)
# For SDLmain
if(NOT SDL_BUILDING_LIBRARY)
if(SDLMAIN_LIBRARY)
set(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP})
if(SDLMAIN_LIBRARY AND NOT SDL_BUILDING_LIBRARY)
list(FIND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" _SDL_MAIN_INDEX)
if(_SDL_MAIN_INDEX EQUAL -1)
list(APPEND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}")
endif()
unset(_SDL_MAIN_INDEX)
endif()
# For OS X, SDL uses Cocoa as a backend so it must link to Cocoa.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment