Is there any way to have CMake make a new static library that includes the 
objects from another existing static library?

As an example (here a Linux-specific example) of doing this manually, suppose I 
have an existing library "libA.a", as well as an object file "B.o" that I have 
just compiled, and I want to combine the two of them into a single static 
library named "libB.a" .  By hand I could do this:

ar xv libA.a      # generates an A.o or something similar
ar rcs libB.a B.o A.o

Can this be done (in a cross-platform way) with CMake commands?

(Of course, if I have access to the source code for A, this is simple, but that 
may not always be the case.)

Thank you for any tips,
Eric

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to