It's "advanced" CMake use, but you might want to have a look at overriding
the CMake "rule variable" CMAKE_CXX_CREATE_STATIC_LIBRARY. (Or _C_ if it's C
source code.) You should be able to add some linker flags in there, although
they may apply to all static libraries built in the whole project. I'm not
100% clear myself on how these rule variables work...

Perhaps somebody else who has used a technique like this can chime in?


HTH,
David

On 6/14/07, Jesper Eskilson <[EMAIL PROTECTED]> wrote:



2007/6/14, Brandon Van Every <[EMAIL PROTECTED]>:
>
> On 6/13/07, Jesper Eskilson <[EMAIL PROTECTED]> wrote:
> > 2007/6/13, Brandon Van Every <[EMAIL PROTECTED]>:
> > >
> > > But why don't you just ship your users a dynamic lib?  As far as I
> > > know, there are no restrictions on dynamic libs including static
> libs.
> >
> > That is an alternative, but it requires a non-trivial amount of work,
> > testing, documentation fixes etc., which I'd prefer not to embark on
> > at the moment.
>
> I take it you have no infrastructure for dynamic libs at all in your
> code then?  Because if you did, like all your declspecs and so forth,
> it's pretty easy to add in CMake.


The problem isn't CMake in that case, it's updating all the stuff around
it which assumes that the lib is static: documentation (the lib is part of a
SDK shipped to customers), testing, etc. That's not something I want to do
at this time.

Is it really impossible to pass an option to the linker when creating a
static library?

--
/Jesper
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to