Seems the the db include directory was not set correctly. Can you search your system for db_cxx.h and db.h and post the results? I'll try to look at it when I have time.
Here You go:
db_cxx.h :
$ find /usr | grep db_cxx
/usr/include/db4.7/db_cxx.h
/usr/include/db4.8/db_cxx.h
/usr/include/db4.5/db_cxx.h
/usr/include/db4.6/db_cxx.h
db.h :
$ find /usr | fgrep '/db.h'
/usr/include/db4.7/db.h
/usr/include/htdig_db/db.h
/usr/include/db4.8/db.h
/usr/include/db4.5/db.h
Interesting. You have your db headers installed in db4.7, while on my FreeBSD installation it's db47. I think it should work if you use
my FindBerkeleyDB module and set DB_VERSION to 4.7, instead of 47. Anyway at least with the REQUIRED flag, the CMake configuration will bail out as it should, if it's unable to find the headers.