Fix libsdl bundling on OSX when library rather than framework is used
authorkoda
Tue, 02 Jun 2015 17:57:15 +0100
changeset 10974 0f9fc5923be4
parent 10973 36b84888934c
child 10975 47c3a00f8037
Fix libsdl bundling on OSX when library rather than framework is used
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)