Make CMake configuration more modular