private function processAddSources($sources, $project)
    {
        $groupSources = [];
        foreach ($sources as $source) {
            $dirName = str_replace(\DIRECTORY_SEPARATOR, '/', \dirname($source));
            if (!isset($groupSources[$dirName])) {
                $groupSources[$dirName] = [];
            }
            $groupSources[$dirName][] = basename($source);
        }
        $groups = [];
        foreach ($groupSources as $dirname => $files) {
            $groups[] = 'ADD_SOURCES(configure_module_dirname + "/'.$dirname.'", "'.
                        implode(' ', $files).'", "'.$project.'");';
        }

        return $groups;
    }