hedgewars/CMakeLists.txt
changeset 9741 cf086f49516b
parent 9668 75aab6802a2e
child 9743 6e505ea936ad
--- a/hedgewars/CMakeLists.txt	Tue Dec 03 17:06:40 2013 +0200
+++ b/hedgewars/CMakeLists.txt	Tue Dec 03 17:39:07 2013 +0100
@@ -166,6 +166,16 @@
 #needs to be last
 add_definitions(-dDEBUGFILE)
 
+
+# make source files objects depend on their predecessors in list
+foreach(loop_var ${engine_sources})
+    if (sourcefiles_sofar)
+        SET_SOURCE_FILES_PROPERTIES(${loop_var} PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}")
+    endif()
+    list(APPEND sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
+endforeach(loop_var)
+
+
 #SOURCE AND PROGRAMS SECTION
 if(BUILD_ENGINE_LIBRARY)
     message("***Engine will be built as library (experimental)***")