Reorganised CMake configuration