Hi, David, I did as you suggested:
ADD_CUSTOM_COMMAND(OUTPUT MyFile.hh ...) ADD_CUTSOM_TARGET(MyHeaders DEPENDS MyFile.hh) ADD_LIBRARY(MYLIB ${MYLIB_SRCS}) ADD_DEPENDENCIES(MYLIB MyHeaders) ADD_LIBRARY(MYLIBpic ${MYLIB_SRCS}) ADD_DEPENDENCIES(MYLIBpic MyHeaders) Didn't work. Target "MyHeaders" is build two times when I do "gmake -j2" I see two "Generating MyFile.hh" lines and MyFile.hh has duplicate lines. Denis > David Cole wrote: > > The easiest way to make this work is to have a separate > custom target > that depends on the output of the custom command, and then > to have the > two libraries depend on that custom target with > add_dependencies... > _______________________________________________ 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