[BioLib-dev] USE_GSL

Pjotr Prins pjotr.public14 at thebird.nl
Wed Aug 5 17:01:54 UTC 2009


 
Hi Xin,

Now we have a working libsequence compile we need to link that
library.

I am going to hand this to you - it is a nice exercise. Basically what
you need to do is link libsequence-5.0.0.dylib (or .so in Linux)
against the SWIG library you generate, e.g. python/../libsequence.so. That way
you import the necessary functions from GSL.

I have done something similar for the biolib-core shared library.
When you check biolib/tools/cmake-support/modules you can see in
FindMapLibraries.cmake that when you define 'USE_CORE' it will locate
the shared library and set ${CORE_LIBRARY}. In fact, you have adapted
that already for OSX before(!) Here create a section USE_GSL which
defines GSL_LIBRARY.

This in turn is linked in FindMapSWIG.cmake - in the line
SWIG_LINK_LIBRARIES. Where the library gets linked against the SWIG
generated libraries. Add ${GSL_LIBRARY} there.

When someone defines USE_CORE in their CMakeLists.txt file (e.g. in
the Python mapping) the biolib core library gets linked in.

So, what you need to do is create a similar facility when someone
defines USE_GSL. Which you can do for the libsequence mapping.

First fork my cmake-support tree on github to your account. Next
checkout the master branch in your biolib tree, etc. Exactly what you
did with the libsequence git submodule a few days ago.

Pj.




More information about the BioLib-dev mailing list