Fix CMake scripts