[CMake] linking boost libraries built inside the project on mac os

Slava s.v.savenko at gmail.com
Tue Feb 2 07:01:17 EST 2016


I failed to reproduce it with a toy project, so please bear with me...
I compile and install boost at config time (by generating the helper cmake
file with external project and running cmake on it).
It is found by standard findBoost afterwards and linked against
Boost_UNIT_TEST_FRAMEWORK_LIBRARY.
All is fine till here. Now project is built, but trying to run the
resulting binary on mac throws me:

dyld: Library not loaded: libboost_unit_test_framework.dylib
  Referenced from: /blablabla/util/./test
  Reason: image not found
Trace/BPT trap: 5

On linux everything works well.
The similar project with a toy library compiled and linked instead of boost
works fine on mac too.

cmake 3.2,3.4. linux, macos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160202/f6981798/attachment.html>


More information about the CMake mailing list