Skip to content

Commit b8306e9

Browse files
committed
doc: update README for windows build.
1 parent ee4811d commit b8306e9

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

README.rst

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,39 @@ Fetch Sources and Build
7373

7474
You can use the following to checkout and build mongo-c-driver::
7575

76-
$ git clone https://github.com/mongodb/mongo-c-driver.git
77-
$ cd mongo-c-driver
78-
$ ./autogen.sh
79-
$ make
80-
$ sudo make install
76+
git clone https://github.com/mongodb/mongo-c-driver.git
77+
cd mongo-c-driver
78+
./autogen.sh
79+
make
80+
sudo make install
8181

8282
In standard automake fasion, ./autogen.sh only needs to be run once.
8383
You can use ./configure directly going forward.
8484
Also, see ./configure --help for all configure options.
85+
86+
87+
Building on Windows
88+
===================
89+
90+
Currently, the cmake build system for mongo-c-driver does not build the libbson
91+
package as well. This needs to be done manually with cmake.
92+
93+
If you are building from git, and not a release tarball, you also need to
94+
initialize the git submodule for libbson::
95+
96+
git submodule init
97+
git submodule update
98+
99+
Then proceed to build and install libbson using cmake and Visual Studio's
100+
command line tool, msbuild.exe. You can of course open these project files
101+
from Visual Studio as well::
102+
103+
cd src\libbson
104+
cmake -DCMAKE_INSTALL_PREFIX=C:\usr .
105+
msbuild.exe ALL_BUILD.vcxproj
106+
msbuild.exe INSTALL.vcxproj
107+
cd ..\..
108+
cmake -DCMAKE_INSTALL_PREFIX=C:\usr -DBSON_ROOT_DIR=C:\usr .
109+
msbuild.exe ALL_BUILD.vcxproj
110+
msbuild.exe INSTALL.vcxproj
111+

0 commit comments

Comments
 (0)