[CMake] Merging static libraries

Emmanuel Blot eblotml at free.fr
Tue Oct 14 17:55:29 EDT 2008


Hello,

I don't know how to resolve a dependency issue.

I use CMake to build several static libraries (cross-compilation for  
ARM target)
I've added some custom commands to merge the object files of several  
libraries (.a files) into a single static library.

However, I don't know how to tell CMake to run this custom command  
once all the primary libraries have been built, i.e. that the 'global'  
library depends on the primary libraries. Without this explicit  
dependency, CMake sometimes attempts to build up the global libary  
before the primary libraries are generated.

I tried to add an explicit dependency between the global library and  
the primary libraries files, but it seems that CMake does not "see"  
the target of an ADD_LIBRARY directive as a target file.

How can I achieve this with CMake ?

Thanks,
Emmanuel



More information about the CMake mailing list