Hi list,

This is a follow-up of my problem I discussed with myself on the
cmake-mailing list: "CLANG vs GCC when linking executables".

I found the root-cause of this problem:

When constructing the rpath-arguments cmake is using an
cmOrderDirectories called OrderLinkerSearchPath to which all
the runtime-libraries via AddRuntimeLibrary() have been added.

In AddRuntimeLibrary() it checks whether the library-path is an
implicit directory.

To this list somewhere the lib/-path located next to the
compiler-bin/-path has been added.

This works well if the compiler is installed in /usr/bin
because /usr/lib is present in the system's loader-configuration.

In my case I have locally built a compiler and in the lib/-dir next to
the bin/-dir I installed other libraries. When now linking with one of
them (via an IMPORTED library), cmake does not add the rpath because it
assumes lib/ is implicitly used by the loader (or something else?).

What can I do? Is this a bug in cmake or in my setup? Why is this path
considered implicit?

best regards,
--
Patrick.
-- 

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-developers

Reply via email to