Hi, all
As far as I know, there are currently a number of ways to find libraries from the system and package manager:
1. cmake find_package and its .cmake import file
2. pkgconfig and .pc files
3. directly from the system library path, e.g. /usr/lib ...
4. from some package managers, homebrew, vcpkg, conda, pacman, apt ...
In the current xmake build system, if the user wants to use the system libraries, the libraries will be found from these cases as much as possible.
I think that a standard to converge these cases is necessary, which can simplify the build system to find libraries.
If we just specify a uniform package metadata format to get this library information. Then where should this metadata file be stored? How should the build system find it? Do we need to provide a tool like pkg-config?
Also, do we need to make all build systems and package managers provide an additional package metadata file when installing a package? For example, cmake now has its own .cmake library import file format.
Also, some package managers don't install packages directly into the system path, e.g. conan, nixpkgs, and it's a bit complicated to find the package metadata file from them, and there's no standardised way to do it.
Ruki Wang