Generate better CMakeLists.txt.