Re-organised CMakeLists.txt.