tags:

views:

391

answers:

2

I have a qmake build of a few libraries and an app which depends on them. Using the subdirs template I'm able to get qmake to output a .sln file which works almost to my liking in VC2008. Though I've specified the dependencies between the targets in every way I've seen described, I end up with no "project dependencies" in the .sln file, and I have to add these in manually.

So far I've tried

CONFIG += ordered

with correct ordering to no avail.

And similarly the more arcane syntax:

client.depends = core common

Which also doesn't work. No dependencies whatsoever show up when I load the sln.

A: 

I am not a wiz in makefiles but if I were you, I would try to recreate that dependency in with QtCreator by editing the .pro file, running qmake then looking at the auto-generated result in the MAKLEFILE. If you want to know how qmake works then look at the qt documentation.

yan bellavance
I've been over every set of docs I can find. And done plenty of source diving to boot. As a side note, the makefiles qmake generates seem to have the dependencies correct. It's the .sln which has the problem.
Michael Daum
@Michael: do you mean the individual .vcproj files (since I believe that's where those dependencies live).
Travis Gockel
I would have guessed this stuff lived in the .sln file, as that's the file which knows about all of the different projects and can connect them with the dependencies I need.
Michael Daum
+1  A: 

From an old mailing list entry: http://lists.trolltech.com/qt-interest/2006-07/thread00238-0.html

It appears that it tries to figure out which things are dependent for you. Are you able to build from the sln without entering the project dependencies manually?

Adam W
I came across that cryptic post before. Not sure if the information is current. I've certainly tried using both the simple and the complex methods it describes, but to no avail.Without entering the dependencies manually, I can't say that the build really works, no. It's not completely broken, but there are enough problems, both overt and silent, that it's always worth it to add the deps in by hand.
Michael Daum
Have you tried to set the dependencies with QtCreator and then create the sln? I don't have my Qt dev machine in front of me, so I can't say for sure what it puts into the pro file when you specify dependencies in the project view.
Adam W