-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Portability
-
None
https://github.com/mongodb/mongo-cxx-driver/pull/520
This PR enables a workaround for an upstream bug: libbson and mongo_c's builds don't create .pc files on Windows. As a result, pkg-config can't find them even if they exist and it is told where to look.
The workaround is as follows: The existing cmake files always trust pkg-config if it is found – if a user specifies a correct path to libbson, but pkg-config can't find libbson, then the cmake file reports that libbson can't be found. This fix prioritizes the user-specified path so that it is always used if specified, even if pkg-config runs and can't find the package.