[CMake] target_link_libraries replacing fully-qualified library with -l<x>
Brad King
brad.king at kitware.com
Thu Jan 29 10:36:49 EST 2015
On 01/29/2015 10:32 AM, Chris Green wrote:
> I can confirm that replacing the text libtbb.so file containing the
> INPUT instruction with a link to the library with the SONAME is
> sufficient to solve the problem, at least as a short term workaround.
> There is no importing of targets: this library is found with
> find_library as part of a config.cmake file invoked as part of
> find_package(). I don't know whether CMake is using readelf, objdump or
> readlink, but it appears that something of that nature is being tried (a
> quick search with ack revealed cmELF.{h,cxx}). If interpreting the INPUT
> directive were to be added to that procedure, I think we would be very
> happy. Should I put an entry in Mantis?
Nils is correct that GuessLibrarySOName is used. I'd forgotten about that.
If you link tothis library using a full path manually, what is recorded
in the NEEDED field of the resulting binary? Without SONAME many linkers
record the full path. Does INPUT avoid that?
Thanks,
-Brad
More information about the CMake
mailing list