begin CMake refactoring