[CMake] external library dependencies

James Bigler bigler at cs.utah.edu
Mon Jan 7 10:07:52 EST 2008


Hi, nobody responded.  I have another question (see below).

On Dec 20, 2007, at 1:41 PM, James Bigler wrote:

> I have one project built by cmake where I write out the library  
> configuration with EXPORT_LIBRARY_DEPENDENCIES.
>
> I have another project where I include that file.  This works great  
> for static building, because it handles all the transitive link  
> properties.
>
> One thing I noticed, however, is that if I change a library from  
> the first project, running make in the second project doesn't  
> produce a relink of dependent libraries.
>
> Is there a mechanism to get CMake to recognize that the libraries  
> have changed and to do dependency scanning?
>
> I'm using cmake 2.4.7 on mac.

If I had the full path to the library, is the modified time  
dependency noted then?

FIND_LIBRARY(MY_LIB mylib ...)
TARGET_LINK_LIBRARY(mainLib ${MY_LIB})

Is it possible to add a file dependency to a target like you can to a  
source file (ala SET_SOURCE_FILES_PROPERTIES(... PROPERTIES  
OBJECT_DEPENDS ...) )?

James



More information about the CMake mailing list