Simplified and improved CMakeLists.