Changed for couchdb using CMake

Change-Id: I600d79ac0beedfc218bca6139c543c5f2b7b4c7c
Reviewed-on: http://review.couchbase.org/34720
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Eric Limare <eric.limare@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>