Add CMake script and fix all errors