Migrating to CMake build system

Done work for migrating from custom build system to cake (more common)