Priority: Not Evaluated
Affects Version/s: None
Fix Version/s: None
Component/s: Configuration Probes
As proposed in , it is nice to have a module that allow to find generic library in a system. Suggested names - ExternalModule, ExternalPackageModule, FindPackageModule (hello, cmake!).
That module should try several ways of finding a package. For now, I can only think about PkgConfigProbe and IncludeProbe+LibraryProbe. And, of course, it should allow to fallback to user-specified paths.
Should it support searching library within user project tree? IMO, no.
Pkg-config works on both Linux and Mac (installed with homebrew to /usr/local).
IncludeProbe is quite dumb now, there are ways to improve it.
First, both IncludeProbe and LibraryProbe should respect qbs.sysroot property (aka sdkPath on Mac). In case it is present, they should look in sysroot/usr/, otherwise, in /usr/. Currently, only /usr/* is supported (via PathProbe).
Second, LibraryProbe should do the following:
On Mac, if sysroot is not present look at /usr/lib, than at /usr/local (homebrew), then at /opt/local (MacPorts). If sys root is present, only /usr should be used (because normally people won't install anything into the sdk as it is wiped with Xcode update).
On Linux, if sysroot is not present, look at /usr/lib/xARCH-linux-gnu - (Debian case) and /usr/libARCH (lib64 or lib32). Then check for architecture - if host.arch == target.arch, look at /usr/lib.
What about arm?
On windows... Dunno about windows... Check for Visual Studio install dir? For c:\windows\system32?
Did I missed something?