[Cmake] Exporting library dependencies

Amitha Perera perera at cs.rpi.edu
Fri Jul 30 12:25:51 EDT 2004


Folks,

The current CMake way of exporting library dependencies from one tree
to another---using EXPORT_LIBRARY_DEPENDENCIES and
FIND_PACKAGE---only exports the dependencies required for
linking. This means two things. (1) the method will only would when
the first project uses LIBRARY_OUTPUT_PATH to put all the libraries
into one place. (2) when libraries in the first tree change, the
makefiles in the second tree have no way to rebuild affected targets.

One way to solve this is to export all the xxx_LIB_PATH variables in
addition to the rest. I am not sure how doing this will affect the
concept of an "installed tree", so maybe the solution is to output
these paths into, say, PRJNAMELibraryLocations.cmake. The
FIND_PACKAGE would then also look for this file in the first tree and
use it if necessary.

I haven't tried this yet, but am willing to do so if no-one has any
objections on the basic idea.

Comments?

Amitha.


More information about the Cmake mailing list