Hello!

Michael Wild wrote:
> IMHO it would be simpler and safer to have a function which collects all
> the file names, adds them to a global property and then allows you to
> compile a static library from that. E.g (completely untested):

Yeah, you are right, this approach sounds much better.

But there is still a small missing piece. Modules have at least one entry
point (or symbol) which is the same, so that they can be loaded.

This is perfectly ok for modules, but raises a problem when you want to link
them together statically.

Elektra has solved this issue by having defined:
#ifdef ELEKTRA_STATIC
        #define KDBEXPORT(module) KDB
*libelektra_##module##_LTX_kdbBackendFactory(void)      
#else
        #define KDBEXPORT(module) KDB *kdbBackendFactory(void)
#endif

and Modules use
KDBEXPORT(modulename)
{
        return kdbBackendExport(BACKENDNAME, ...
}

to export this symbol which changes for the module and static case.


Which is the cmake way to solve this issue?

thank you
Markus


-- 
http://www.markus-raab.org | I can't believe that life's so complex,
                      -o)  | when I just want to sit here and watch you 
Kernel 2.6.24-1-a      /\  | undress   
on a x86_64           _\_v | 

_______________________________________________
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