removed from linker sdl, and added option to final version
authorRafa Gaitán <rgaitan@crysis.(none)>
Mon, 7 Dec 2009 18:14:29 +0000 (19:14 +0100)
committerRafa Gaitán <rgaitan@crysis.(none)>
Mon, 7 Dec 2009 18:14:29 +0000 (19:14 +0100)
CMakeLists.txt

index 449cd29e4eb3474cb68a6d04b4832278d603934e..d22cafa149bb7f5e317010c1d208b66070e3b5bf 100644 (file)
@@ -59,13 +59,28 @@ include_directories(
        ${SDL_INCLUDE_DIR}\r
 )\r
 \r
+OPTION(FINAL_VERSION "Set to on to remove all link libraries that are not needed in the final version" OFF)\r
+\r
 SET(LIBRARIES \r
-        ${SDL_LIBRARY}\r
-       ${OPENGL_LIBRARIES}\r
        m\r
        dl\r
        ${CMAKE_THREAD_LIBS_INIT}\r
 )\r
+IF(APPLE)\r
+       SET(LIBRARIES\r
+               ${LIBRARIES}\r
+               ${SDL_LIBRARY}\r
+               ${OPENGL_LIBRARIES}\r
+       )\r
+ELSE(APPLE)\r
+       IF(NOT FINAL_VERSION)\r
+               SET(LIBRARIES\r
+                       ${LIBRARIES}\r
+                       ${OPENGL_LIBRARIES}\r
+               )\r
+       ENDIF(NOT FINAL_VERSION)\r
+ENDIF(APPLE)\r
+\r
 SET(IS_APPLICATION 0)\r
 SETUP_DEMO_LAUNCHER(${DEMO_NAME})\r
 #############\r