== Clamp To Constraint ==
[blender-staging.git] / blenderplayer / CMakeLists.txt
index 73f850b1953ac951421d59fc6f43596e1a9ea28f..4a2fc330077ebf61ffe7b0b3bee65c43514e4a6a 100644 (file)
 #
 # ***** END GPL/BL DUAL LICENSE BLOCK *****
 
-SETUP_LIBDIRS()
+MESSAGE(STATUS "Configuring blenderplayer")
 
-FILE(APPEND ../source/blender/makesdna/intern/dna.c "")
+SETUP_LIBDIRS()
 
 IF(WITH_QUICKTIME)
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
+ADD_CUSTOM_COMMAND(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
+  COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
+  DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
+)
+
 IF(WIN32)
-  ADD_EXECUTABLE(blenderplayer ${EXETYPE} ../source/blender/makesdna/intern/dna.c ../source/icons/winblender.rc)
+  ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
 ELSE(WIN32)
-  ADD_EXECUTABLE(blenderplayer ${EXETYPE} ../source/blender/makesdna/intern/dna.c)
+  ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
 ENDIF(WIN32)
 
 ADD_DEPENDENCIES(blenderplayer makesdna)
 
-SETUP_LIBLINKS(blenderplayer)
-FILE(READ ${CMAKE_SOURCE_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
+FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 
 SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
 
@@ -61,8 +66,6 @@ IF(UNIX)
     bf_decimation 
     bf_blenloader 
     bf_blenpluginapi 
-    bf_imbuf 
-    bf_avi 
     bf_blroutines 
     bf_converter 
     bf_sumo 
@@ -80,6 +83,9 @@ IF(UNIX)
     bf_moto 
     bf_soundsystem 
     bf_kernel 
+    bf_nodes
+    bf_imbuf
+    bf_avi 
     kx_network 
     bf_ngnetwork 
     bf_loopbacknetwork 
@@ -105,7 +111,7 @@ IF(UNIX)
       ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
     ENDFOREACH(SEARCHLIB)
     IF(REMLIB)
-      MESSAGE("Removing library ${REMLIB} from blenderplayer linking because: not configured")
+      MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
       LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
     ENDIF(REMLIB)
   ENDFOREACH(SORTLIB)
@@ -115,4 +121,4 @@ ELSE(UNIX)
   TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
 ENDIF(UNIX)
 
-MESSAGE(STATUS "Configuring blenderplayer")
+SETUP_LIBLINKS(blenderplayer)