Hi All,
I’m attempting to add dependencies for generated code into my builds. I have read the wiki article that J Decker posted to me in my last query http://www.vtk.org/Wiki/CMake_FAQ#How_can_I_add_a_dependency_to_a_source_file_which_is_generated_in_a_subdirectory.3F , but unfortunately, it doesn’t answer my current question. Neither has creative use of search keys turned up anything helpful. The problem is : the files that are generated are not dependencies of the top level target (as discussed in the article), they are dependencies of another source file because they are generated includes. If I add the dependency to the executable, there’s no guarantee that the order will be correct, from what I see. i.e. message compiler runs in directory A, produces a .txt output containing string definitions. Generated file is included into an RC file in directory B, within the correct RC context. The piece I’m missing is how to hook a source file as a top level target, without having to reimplement the compilation phase as a custom rule. The makefile equivalent of all this is very simply : myResource.rc : externalGeneratedFile.txt This feels like fairly common usage, so I’m sure I’ve just missed something, but I’m not sure what. many thanks /t
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake