[TASK] Adapt CMake and restructure configurations.