diff -r 36b84888934c -r 0f9fc5923be4 tools/CMakeLists.txt --- a/tools/CMakeLists.txt Tue Jun 02 01:58:10 2015 +0100 +++ b/tools/CMakeLists.txt Tue Jun 02 17:57:15 2015 +0100 @@ -29,6 +29,8 @@ #remove the ";-framework Cocoa" from the SDL_LIBRARY variable string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL_LIBRARY}") + #remove the "libSDLmain.a" from the SDL_LIBRARY variable + string(REGEX REPLACE ".*;(.*)" "\\1" sdl_library_only "${sdl_library_only}") if(NOT NOPNG) #get the neme of the library (harmelss if it is static)