refactor CMakeLists.txt