Skip to content

Commit 0cfb52c

Browse files
committed
document BSON_OUTPUT_BASENAME and MONGOC_OUTPUT_BASENAME build options
1 parent 2a57077 commit 0cfb52c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/libmongoc/doc/installing.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,16 @@ Download and untar the latest tarball, enter its directory, and build with CMake
287287
cd cmake-build
288288
CC=/mingw64/bin/gcc.exe /mingw64/bin/cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="C:/mongo-c-driver" -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" ..
289289
make
290+
291+
Additional Options for Integrators
292+
----------------------------------
293+
294+
In the event that you are building the BSON library and/or the C driver to embed with other components and you wish to avoid the potential for collision with components installed from a standard build or from a distribution package manager, you can make use of the ``BSON_OUTPUT_BASENAME`` and ``MONGOC_OUTPUT_BASENAME`` options to ``cmake``.
295+
296+
.. code-block:: none
297+
298+
mkdir cmake-build
299+
cd cmake-build
300+
cmake -DBSON_OUTPUT_BASENAME=custom_bson -DMONGOC_OUTPUT_BASENAME=custom_mongoc ..
301+
302+
The above command would produce libraries named ``libcustom_bson.so`` and ``libcustom_mongoc.so`` (or with the extension appropriate for the build platform). Those libraries could be placed in a standard system directory or in an alternate location and could be linked to by specifying something like ``-lcustom_mongoc -lcustom_bson`` on the linker command line (possibly adjusting the specific flags to those required by your linker).

0 commit comments

Comments
 (0)