Boost logo

Boost Users :

Subject: [Boost-users] CPack, CMake and Boost's shared libraries
From: r_at_[hidden]
Date: 2016-06-25 17:11:54


What is the canonical cross-platform way to package boost shared
libraries with CPack (and/or CMake)?

On Windows, DLLs can be copied to the executable's folder and it will
"just work".
On OS X, one can use install_name_tool to set up a so-called rpath
pointing to a relative location where the libraries reside, relative to
the executable.
On Ubuntu, one can similarly use ldd for setting up the correct
pointers to where the libraries will reside relative to the executable.

The question is then: is there some documentation on how to ship boost
libraries along with your executable, in a cross-platform and canonical
way, with CPack?

Here's a question on stack overflow [1] that addresses the same
problem, however the proposed solution of using

     set(CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath='$ORIGIN'")

in CMake does not seem cross-platform to me (MSVC won't recognize the
command).

Regards,

Raoul

[1]:
http://stackoverflow.com/questions/26142948/packaging-c-program-using-boost-libraries-with-cmake-cpack


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net