Migrate to CMake build system