mongodb/mongo-cxx-driver — pull request #60 by acmorrow (2014-04-21 19:09:47+00:00)
Title: Cxx 130/138

These two commits are only somewhat coupled, but they sort of make sense together because they are granting finer control over how libmongoclient links its dependencies.

The cool part about this is that now, by virtue of adorning the library names, we can produce by way of a multiple build sequence the entire spectrum of libraries that might be needed per CXX-138. Such a sequence might look like:

scons --64 --prefix=somewhere install-mongoclient
scons --64 --dbg=on --prefix=somewhere install-mongoclient
scons --64 --dynamic-windows --sharedclient --prefix=somewhere install-mongoclient
scons --64 --dynamic-windows --sharedclient --dbg=on --prefix=somewhere install-mongoclient

On my system, that gets me in "somwhere" the following libraries:

libmongoclient.lib
libmongoclient-gd.lib
libmongoclient-s.lib
libmongoclient-sgd.lib
mongoclient.dll
mongoclient.exp
mongoclient.lib
mongoclient.pdb
mongoclient-gd.dll
mongoclient-gd.exp
mongoclient-gd.lib
mongoclient-gd.pdb

Which is exactly what we would want. Obviously this is a little complicated for consumers of the library, but only a small subset will need this sophisticated a build. Later, we can try to bend SCons variant system to do all these builds for us, but this seems like an acceptable workaround for now.