Another change necessary for 3.0.2 build (because couchdb/master depends on it):

commit f34e2521364d33b548497be1497765ecac5f1446
Author: Volker Mische <vmx@couchbase.com>
Date:   Tue Sep 2 16:40:22 2014 +0200

    MB-12112: Improve ERL_BUILD_OTP macro

    Erlang apps that follow the OTP convention can easily be build with
    more hard-coded paths, less flexibility is needed. With improvements
    to the ERL_BUILD_OTP macro, less code within individual CMakeLists.txt
    files of OTP apps is needed.

Change-Id: Ie94fd6d74302e9339beddf6427607183b3de3c11
Reviewed-on: http://review.couchbase.org/43770
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>