[CXX-1011] PR: Support finding libbson and mongo_c on Windows when pkg-config is present Created: 29/Aug/16  Updated: 19/Sep/16  Resolved: 08/Sep/16

Status: Closed
Project: C++ Driver
Component/s: Portability
Affects Version/s: None
Fix Version/s: 3.0.2

Type: Bug Priority: Major - P3
Reporter: David Golden Assignee: Backlog - CXX Driver Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.



 Comments   
Comment by Andrew Morrow (Inactive) [ 08/Sep/16 ]

I forgot to amend in the CXX ticket when squashing/rebasing the PR, the fix went in on this commit: https://github.com/mongodb/mongo-cxx-driver/commit/b3061e3061bc81467bcd008eef8f681d5d45cb52

Generated at Wed Feb 07 22:01:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.