[CMake] CPack install 3rd party shared libraries

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Jul 19 06:40:57 EDT 2017


2017-07-19 10:24 GMT+02:00 Roman Wüger <roman.wueger at gmx.at>:
> Hello,
>
> I have a project which depends on a self compiled 3rd party project (boost)
> Boost is here only an example, there are other 3rd party libraries too.
>
> If I call the "install" command on the target, then it would be packaged.
> But how could I add the shared libraries and especially the links for the shared libraries?
>
> E.g.:
> libboost_filesystem.so -> libboost_filesystem.so.1.48.0
> libboost_filesystem.so.1.48.0
>
> Thanks in advance

I think fixup_bundle() from BundleUtilities is what you want [1].

We're using it to make our Windows and macOS installs standalone, but
(I think) it should work on Linux as well.

[1] https://cmake.org/cmake/help/v3.8/module/BundleUtilities.html

>
> Best Regards
> Roman
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list