make source files objects depend on their predecessors in list
authorsheepluva
Tue, 03 Dec 2013 17:39:07 +0100
changeset 9741 cf086f49516b
parent 9740 d159ddae0358
child 9742 419e5c651870
make source files objects depend on their predecessors in list
hedgewars/CMakeLists.txt
--- 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)***")