make all objects depend on .inc files (which are not correctly positioned in list, because cmake can't deal with that
authorsheepluva
Tue, 03 Dec 2013 18:09:54 +0100
changeset 9743 6e505ea936ad
parent 9742 419e5c651870
child 9744 1ee4842a9c86
make all objects depend on .inc files (which are not correctly positioned in list, because cmake can't deal with that
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Tue Dec 03 12:10:51 2013 -0500
+++ b/hedgewars/CMakeLists.txt	Tue Dec 03 18:09:54 2013 +0100
@@ -168,10 +168,9 @@
 
 
 # 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})
-    if (sourcefiles_sofar)
-        SET_SOURCE_FILES_PROPERTIES(${loop_var} PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}")
-    endif()
+    SET_SOURCE_FILES_PROPERTIES(${loop_var} PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}")
     list(APPEND sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
 endforeach(loop_var)