add libcvd to external folder.
fix cmake configs.
improve code (c++11 fixes).