Hi
thanks for your reply. Unfortunately i think you misunderstood my problem:
I do not have a build/dependency order problem. I simply want A to learn about the libraries that B links, without having to tell A explicitely WHICH library B links.
Let's consider an example:
Say A is a GUI program which can display images.
Now there is a library B, which contains an image class and ways to load various image formats into this image class. Now of course this library depends on other libraries such as libpng, libjpeg, whatever.
What I want now is: I want to tell the cmake file of A to link B, and all dependencies that B has (in this case: libpng, libjpeg). But I do not explicitely want to tell A to link libpng,libjpeg. It is supposed to learn that from B.
All this is not a matter of functionality - just a matter of encapsulation. I do not want a library user of B to have to worry about which libraries B uses.
In qmake this is done with create_prl and link_prl (see [1]):
One uses the create_prl option on B. This makes the compilation of B write a special .prl file that encodes A's dependencies. Now the link_prl option is used on A, which in turn reads the .prl file (and thus the dependencies of B) and links them automatically. Thats exactly the functionality I want - but I did not find a way to achieve this in cmake.
Did that clarify things?
Thanks again
Frank
[1]
http://doc.trolltech.com/4.5/qmake-e...html#libdepend