[CMake] Building both SHARED and STATIC libs

Bill Hoffman bill.hoffman at kitware.com
Thu Jan 25 14:53:14 EST 2007


Brandon J. Van Every wrote:
> Eric Noulard wrote:
>> Is there a way to build both shared AND static
>> in a single build 
>
>
> Yes.  However, you'll probably need to compile them in separate 
> directories to prevent collisions between object files.  The Chicken 
> CMake build http://www.call-with-current-continuation.org/index.html 
> has non-trivial examples and notes on what remedies are needed.
There was never a collision of object files, they are kept in the 
targetname.dir directory.  The problem was that building the .a would 
remove the .so and the .a before creating the new library. This problem 
was fixed with the CLEAN_DIRECT_OUTPUT property.

-Bill



More information about the CMake mailing list