libsdlmain.a seems not to exist on all systems.

It also doesn't seems neccesairy on all systems, and if neccesairy already in SDL_LIBRARY.
So I made SDLMAIN_LIBRARY optional: cmake will not fail if SDLMAIN_LIBRARY isn't found.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2642 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 29a1e1db95a62db8f9241a9a13dc65915c859d9d
Former-commit-id: efa0d03369bc285cdd9560b6523cde2d24a62ba8
This commit is contained in:
martkelder 2010-08-09 20:09:12 +00:00
parent dd23e28811
commit e8f0c004b8

View file

@ -726,7 +726,9 @@ MACRO(ADD_SDL_LIBRARY TARGET)
IF(SDL_FOUND)
TARGET_LINK_LIBRARIES(${TARGET} ${SDL_LIBRARY})
TARGET_LINK_LIBRARIES(${TARGET} ${SDLMAIN_LIBRARY})
IF(SDLMAIN_LIBRARY)
TARGET_LINK_LIBRARIES(${TARGET} ${SDLMAIN_LIBRARY})
ENDIF(SDLMAIN_LIBRARY)
ELSE(SDL_FOUND)
MESSAGE(FATAL_ERROR "Cannot find SDL library")
ENDIF(SDL_FOUND)