[Cmake] Automatic dependency building under Unix

Amitha Perera perera at cs.rpi.edu
Wed May 9 14:28:59 EDT 2001


1) Under Unix, the CMakeTargets.make contain is list of required
libraries in the variable CMAKE_DEPEND_LIBS. There are not, however,
corresponding rules to make those dependencies. That is, if I start
afresh, go into some directory and type make, it'll stop short with
"not rule to make some-lib.a".

It should be easy to output a rule to run a submake in the directory
for each dependent library: for each library path/libx.a
path/libx.a:
        cd path
        $(MAKE)

These rules could be output in cmUnixMakefileGenerator::OutputDependencies.
If this is okay, I can make such a change and submit a patch. (I can't
commit.)



2) Is there a way to specify a library as an external dependency? Say
LINK_EXTERNAL_LIBRARIES( jpeg )? In vxl, there is a v3p/jpeg library
in the project for those that don't have an external jpeg library. The
idea is to use the external one if you have it. However, if I simply
LINK_LIBRARIES( jpeg ), the CMake system will emit a dependency for
v3p/jpeg, since it just goes by the name.


Thanks,
Amitha.




More information about the CMake mailing list