Should use "l:filename" when linking to path without soname, but no "lib" prefix
When linking to "luv.so", CMake will generate -Wl,-rpath,/home/user/Vcs/luv -lluv
for a given path of /home/user/Vcs/luv/luv.so
, which then fails to link (since there is not "lib" prefix).
At least with GNU tools the following would work there then: -Wl,-rpath,/home/user/Vcs/luv: -l:luv.so
, i.e. use "-l:" with the whole filename.
(I have found the workaround mentioned in #19399 (comment 585434), which appears to work for this also - just wanted to mention/file this regardless)
Related code: cmComputeLinkInformation::AddUserItem (// Use just the library name so the linker will search.).
Ref: https://github.com/neovim/neovim/pull/10661 Ref: https://github.com/NixOS/nixpkgs/issues/64400