Converted library and applications (except QT app) to CMake structure