Completely overhaul CMakeLists.txt