CREATE_PROJECT: Revert idea about createOneProjectPerEngine.

This commit is contained in:
Einar Johan Trøan Sømåen 2015-04-09 18:30:03 +02:00
parent 675bbde436
commit 219a43d745
3 changed files with 6 additions and 21 deletions

View File

@ -1285,22 +1285,17 @@ void ProjectProvider::createProject(BuildSetup &setup) {
if (i->first == setup.projectName)
continue;
// Retain the files between engines if we're creating a single project
if (createOneProjectPerEngine()) {
in.clear(); ex.clear();
}
in.clear(); ex.clear();
const std::string moduleDir = setup.srcDir + targetFolder + i->first;
createModuleList(moduleDir, setup.defines, setup.testDirs, in, ex);
if (createOneProjectPerEngine()) {
createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
}
createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
}
if (setup.tests) {
// Create the main project file.
if (createOneProjectPerEngine()) {
in.clear(); ex.clear();
}
in.clear(); ex.clear();
createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
createModuleList(setup.srcDir + "/base", setup.defines, setup.testDirs, in, ex);
@ -1314,9 +1309,7 @@ void ProjectProvider::createProject(BuildSetup &setup) {
createProjectFile(setup.projectName, svmUUID, setup, setup.srcDir, in, ex);
} else if (!setup.devTools) {
// Last but not least create the main project file.
if (createOneProjectPerEngine()) {
in.clear(); ex.clear();
}
in.clear(); ex.clear();
// File list for the Project file
createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);

View File

@ -458,13 +458,6 @@ protected:
*/
virtual const char *getProjectExtension() { return ""; }
/**
* Returns whether the provider produces one project per engine
* allowing providers such as the XCode-project provider to disable
* the logic for this in the super-class, thus merging the engine-files
* into the main project instead.
*/
virtual bool createOneProjectPerEngine() const { return true; }
/**
* Adds files of the specified directory recursively to given project file.
*

View File

@ -45,9 +45,8 @@ protected:
void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
// Disable multi-project creation on ProjectProvider
bool createOneProjectPerEngine() const { return false; }
private:
std::string _projectRoot;
enum {
SettingsAsList = 0x01,
SettingsSingleItem = 0x02,