-
Type: New Feature
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Labels:None
Many users seem to have difficulty understanding that if they have installed the C driver to a given $prefix that is not among those prefixes that are automatically searched by pkgconfig, that they must set PKG_CONFIG_PATH to $prefix/lib/pkgconfig.
In most cases, users are installing both the C driver and the C++ driver to the same $prefix.
Perhaps we should automatically add CMAKE_INSTALL_PREFIX/lib/pkgconfig to the PKG_CONFIG_PATH in the environment.
In particular, I would do this if:
- There is no PKG_CONFIG_PATH set in the environment when CMake is invoked (i.e. don't mess with it if the user set it)
- The user has customized CMAKE_INSTALL_PREFIX when invoking the C++ driver CMake (so they are asking to install somewhere other than the default build/install).
- The user has not set LIBBSON_DIR and LIBMONGOC_DIR.
That seems pretty safe to do, and might stop a lot of the "my C++ driver build can't find the C driver" sort of tickets or user group posts.