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

Support users adding mongocxx as a CMake subdirectory

      Originally from this Google Group post.

      I'm trying to include mongo-cxx-driver into my CMake project.

      Here is part of my root CMakeLists.txt

      project(testprj)
      add_subdirectory(libbson)
      add_subdirectory(mongo-c-driver)
      add_subdirectory(mongo-cxx-driver)

      While libbson, and mongo-c-driver compiles without problems, mongo-cxx-driver returns errors. It seams CMake cannot locate mongo-c-driver.

      CMake Error at mongo-cxx-driver/src/mongocxx/CMakeLists.txt:23 (find_package):
      By not providing "FindLibMongoC.cmake" in CMAKE_MODULE_PATH this project
      has asked CMake to find a package configuration file provided by
      "LibMongoC", but CMake did not find one.

      Could not find a package configuration file provided by "LibMongoC"
      (requested version 1.5.0) with any of the following names:

      LibMongoCConfig.cmake
      libmongoc-config.cmake

      Add the installation prefix of "LibMongoC" to CMAKE_PREFIX_PATH or set
      "LibMongoC_DIR" to a directory containing one of the above files. If
      "LibMongoC" provides a separate development package or SDK, be sure it has
      been installed.

            Assignee:
            roberto.sanchez@mongodb.com Roberto Sanchez
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: