On Fri, Feb 11, 2022, 18:22 David Blaikie <dblaikie@gmail.com> wrote:
but it's not like we can actually use the linker search path resolution, can we? 

The behavior of the linker is defined. In POSIX it is actually standardized. And there is plenty of prior art of things external do the linker reproducing the same search[1].

But perhaps more importantly, the thing that makes this proposal viable, imho, is precisely the fact that we don't need to introduce a new search path mechanism at all, which means we don't need to get all package managers to converge before we do it.

Now, that isn't to say that the interface units themselves need to be in the library directory, they can still be deployed in whatever location, and the metadata file will point at them directly.

[1] the way we use pkg-config with CMake is by parsing the package config files ourselves, finding the libraries and mapping them to individual imported targets in CMake.