[CMake] How to create a static library out of other static libraries in CMAKE ?

Xiangyun Kong xykong at yahoo.com
Sun Jun 14 23:50:22 EDT 2009


Thanks. When I link the mylib with other objects to form a
dynamic library, I got a lot of undefined symbols.

Xiangyun


--- On Sun, 6/14/09, Tyler Roscoe <tyler at cryptio.net> wrote:

> From: Tyler Roscoe <tyler at cryptio.net>
> Subject: Re: [CMake] How to create a static library out of other static libraries in CMAKE ?
> To: "Xiangyun Kong" <xykong at yahoo.com>
> Cc: cmake at cmake.org
> Date: Sunday, June 14, 2009, 7:52 PM
> On Sun, Jun 14, 2009 at 06:55:15PM
> -0700, Xiangyun Kong wrote:
> > I take it back, even I specify the full names, 
> > the library is built without taking those static
> libraries linked
> > into the target library.
> 
> Oh right. It's still the weekend here :).
> 
> add_library (myLib STATIC ${some_object_files})
> target_link_libraries (myLib ${some_libraries})
> 
> tyler
> 


More information about the CMake mailing list