Hello,

Currently, I have a problem with linking to dynlib outside a bundle.
Let me explain: We have a toolset that contains both unix-tools
(applications without the .app suffix)
and bundles (applications that have the .app suffix). After
installation, tools are installed in "./bin"
and shared libraries are installed in "./lib/mcrl2".

We set the following parameters, for linking:

set(CMAKE_SKIP_BUILD_RPATH false)
set(CMAKE_BUILD_WITH_INSTALL_RPATH false)
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../lib/mcrl2")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)

This allows for unix-tools to find the relatively located libraries at runtime.
However, running a bundle causes a problem. It tries to find the
libraries relative to the
executable which is @executable_path/../lib/mcrl2/lib_XXX.dylib in the
/Contents/MacOS,
instead of the path relative to the bundle, which should be
@executable_path/../../../lib/mcrl2/lib_XXX.dylib.

Perhaps, somebody has some pointers on how to tackle this problem.
Any help is welcome.

Kind regards,
Frank Stappers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to