Improved and simplified CMakeLists.txt.