cmakefile refactoring