[CMake] target_link_libraries replacing fully-qualified library with -l<x>

Chris Green greenc at fnal.gov
Thu Jan 29 10:32:15 EST 2015


Hi,

On 1/29/15 9:06 AM, Brad King wrote:
> then I'm guessing there's no SONAME:
> It can only be this if something tells CMake that it has no SONAME.
> That can only happen when it is an imported target with an appropriate
> property set.  CMake doesn't try to read the binary IIRC.
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?

Thanks,
Chris.

-- 
Chris Green <greenc at fnal.gov>, FNAL CS/SCD/ADSS/SSI/SSD;
'phone (630) 840-2167; Skype: chris.h.green;
IM: greenc at jabber.fnal.gov, chissgreen (AIM, Yahoo),
chissg at hotmail.com (MSNM), chris.h.green (Google Talk).



More information about the CMake mailing list