Migrated build system to CMake