[CMake] Delivering imported libraries with binaries on Linux

Harelick, Matthew MHarelick at ise.com
Wed Oct 12 13:38:17 EDT 2011


Hello:


I am working on a project that relies on third party libraries, for example MyVendor.so.   I am using cmake 2.6.  When the third party shared object is checked out, it is installed in svnroot/Thirdparty/MyVendor/lib/MyVendor.so

I add the library has an imported library.  When I build the application, the location of the library is linked to the precise location above.

How do I:

1)      Encode cmake to generate a make file that copies the library into a location relative to the binary, like
../lib so that I can then use that directory as an import location.  I can copy the file myself manually but it would nice if I could use cmake to help with doing this automatically.  I know that if I was handwriting a makefile I could in effect build a library target by copying one from a different location.

2)      How do I ensure that CPack maintains that relative structure so that internally the application looks in ../lib for the file to dynamically load?

Thanks

Matthew Harelick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111012/a7d6e442/attachment.htm>


More information about the CMake mailing list