Trying to build mongocxx driver. I have installed mongoc driver without problems in path c:\mongo-c-driver (ver. 1.14.0). After running:
cmake.exe -G "Visual Studio 15 2017 Win64"
-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-driver
-DCMAKE_PREFIX_PATH=C:\mongo-c-driver
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_FLAGS="/Zc:__cplusplus"
got an error enter image description here
Don't know why but in in file libbson-1.0-config.cmake I have lines like:
set (BSON_MAJOR_VERSION 0)
set (BSON_MINOR_VERSION 0)
set (BSON_MICRO_VERSION 0)
set (BSON_VERSION 0.0.0)
and in libbson-1.0-config-version.cmake:
set (PACKAGE_VERSION 0.0.0)
I Think that here's possible reason but changing these lines manually doesn't fix the problem (try with 3.2 and 3.4 version of mongocxx driver).
Please see https://jira.mongodb.org/browse/CDRIVER-3022 for instructions on how to avoid this issue. The TL;DR is that the zip file that GitHub automatically produces for a release doesn't contain required version information.