[CMake] Newbie question: Static linking
Rolf Eike Beer
eike at sf-mail.de
Mon May 23 15:49:35 EDT 2011
Sanatan Rai wrote:
> Unfortunately, I am stuck with the paradigm of having to kludge loading an
> entire library. For various reasons the one may not have a reference to
> the hosted object in main, which must remain agnostic. Indeed, in my
> particular line of business (finance), this happens to be a `standard'
> pattern. Whether good or bad is a discussion that'd be too off
> topic...(though am happy to continue the discussion off/on list if people
> are so inclined!).
What about your application calling an initStaticLibs() function which is
defined in an header. That header is written by CMake using FILE(WRITE ...)
because CMake knows which libs are there and by this which init functions need
to be called. They just have to be somehow related to the library name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the CMake