[CMake] Merging static libraries
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Oct 14 18:17:42 EDT 2008
On Tuesday 14 October 2008, Emmanuel Blot wrote:
> Hello,
>
> I don't know how to resolve a dependency issue.
>
> I use CMake to build several static libraries (cross-compilation for
> ARM target)
Do you actually have to build them as separate static libs or could you just
build one big static lib ?
> 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 ?
Please post the code which didn't work for you.
Alex
More information about the CMake
mailing list