This looks great, thanks!  What if inside this branch we instead have something like:

add_library(xcode_sdlmain STATIC externals/sdl-1.2.15/xcode/SDLMain.m)
set(SDLMAIN_LIBRARY xcode_sdlmain)

Then ${SDLMAIN_LIBRARY} will get picked up automatically for the examples, and we're no longer include the SDLMain source file in the library itself.  What do you think?