Minor refactoring of CMakeLists.txt