Refactoring in CMakeLists.txt in demo1