hedgewars/CMakeLists.txt
branchsdl2transition
changeset 9798 f2b18754742f
parent 9703 966d180184b4
parent 9743 6e505ea936ad
child 11360 7a7611adf715
--- a/hedgewars/CMakeLists.txt	Sat Dec 14 21:16:20 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Tue Dec 17 00:02:52 2013 +0400
@@ -176,6 +176,15 @@
 #needs to be last
 add_definitions(-dDEBUGFILE)
 
+
+# make source files objects depend on their predecessors in list
+set(sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/options.inc" "${CMAKE_CURRENT_BINARY_DIR}/config.inc")
+foreach(loop_var ${engine_sources})
+    SET_SOURCE_FILES_PROPERTIES(${loop_var} PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}")
+    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)***")