Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1073

Automatically add CMAKE_INSTALL_PREFIX/lib/pkgconfig to PKG_CONFIG_PATH when appropriate

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 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.

            Assignee:
            backlog-cxx-driver [DO NOT USE] Backlog - CXX Driver Team
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: