Well, usually when you're dealing with projects like this putting a dependency on the target file is generally sufficient, since that target file (in its own project file) has a dependency on the header files. (This is, by the way, the canonical workaround for dealing with dependency tracking on static libraries.) I'm not sure, however, that make will detect that the .o files are out of date when that's simply a linker dependency. Try it, see how it goes.
/s/ Adam On Wed, Dec 16, 2009 at 8:31 PM, John Vilburn <j...@ohanasoftware.com> wrote: > Adam, > > Thank you for the response. > > The problem I see with that approach is that whenever I add or remove a new > header in one project I have to remember to modify PRE_TARGETDEP in the other > project. > > I guess I could put the headers in a .pro.inc file and include that in both > .pro files. But again, shouldn't there be a better way? > > Thanks, > John > > > On Dec 16, 2009, at 4:20 PM, Coda Highland wrote: > >> You can use PRE_TARGETDEPS in the subdirs' .pro files to watch for >> individual files to be modified. >> >> /s/ Adam >> >> On Wed, Dec 16, 2009 at 7:21 PM, John Vilburn <j...@ohanasoftware.com> wrote: >>> I have a .pro file that looks like this: >>> >>> TEMPLATE = subdirs >>> CONFIG += ordered >>> SUBDIRS = Project1 \ >>> Project2 \ >>> Project3 >>> >>> Some of the .h files in Project1 are used in Project2 and Project3. When I >>> change one of those header files and do a build, only the files in Project1 >>> get rebuilt. Is there a way to have qmake or Qt Creator notice those >>> dependencies and rebuild the appropriate files in Project 2 and 3? >>> Including the .h files from Project1 in the list of headers of Project2 and >>> 3 would work, I suppose. But there must be a better way. >>> >>> Thanks, >>> John >>> >>> >>> _______________________________________________ >>> Qt-creator mailing list >>> Qt-creator@trolltech.com >>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>> >> >> _______________________________________________ >> Qt-creator mailing list >> Qt-creator@trolltech.com >> http://lists.trolltech.com/mailman/listinfo/qt-creator > > > _______________________________________________ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > _______________________________________________ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator