Rewrite CMakeLists