diff options
author | Paul Gilbert | 2016-12-17 15:12:52 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-17 15:12:52 -0500 |
commit | bbef10c0687fd0063dd8a884a62823dce71b4c3c (patch) | |
tree | 6d9900db4b1311af2239d3860f8ce4ce3ae69144 /devtools/create_project | |
parent | 1194341b69a7d7451c3c962fbd733c75c801e944 (diff) | |
download | scummvm-rg350-bbef10c0687fd0063dd8a884a62823dce71b4c3c.tar.gz scummvm-rg350-bbef10c0687fd0063dd8a884a62823dce71b4c3c.tar.bz2 scummvm-rg350-bbef10c0687fd0063dd8a884a62823dce71b4c3c.zip |
CREATE_PROJECT: Fix Visual Studio linking problems after Munt merge
Diffstat (limited to 'devtools/create_project')
-rw-r--r-- | devtools/create_project/create_project.cpp | 7 | ||||
-rw-r--r-- | devtools/create_project/msbuild.cpp | 4 | ||||
-rw-r--r-- | devtools/create_project/visualstudio.cpp | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 8eba73d7b3..6072120a15 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -1527,7 +1527,8 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p StringList duplicate; for (StringList::const_iterator i = includeList.begin(); i != includeList.end(); ++i) { - const std::string fileName = getLastPathComponent(*i); + std::string fileName = getLastPathComponent(*i); + std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower); // Leave out non object file names. if (fileName.size() < 2 || fileName.compare(fileName.size() - 2, 2, ".o")) @@ -1540,7 +1541,9 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p // Search for duplicates StringList::const_iterator j = i; ++j; for (; j != includeList.end(); ++j) { - if (fileName == getLastPathComponent(*j)) { + std::string candidateFileName = getLastPathComponent(*j); + std::transform(candidateFileName.begin(), candidateFileName.end(), candidateFileName.begin(), tolower); + if (fileName == candidateFileName) { duplicate.push_back(fileName); break; } diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 2c6a89543f..3accce4e05 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -514,7 +514,9 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream if (!_compileFiles.empty()) { projectFile << "\t<ItemGroup>\n"; for (std::list<FileEntry>::const_iterator entry = _compileFiles.begin(); entry != _compileFiles.end(); ++entry) { - const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), (*entry).name + ".o") != duplicate.end()); + std::string fileName = (*entry).name + ".o"; + std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower); + const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), fileName) != duplicate.end()); // Deal with duplicated file names if (isDuplicate) { diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 96fdbdf27a..d63c347b17 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -338,7 +338,9 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst if (producesObjectFile(node->name)) { std::string name, ext; splitFilename(node->name, name, ext); - const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name + ".o") != duplicate.end()); + name += ".o"; + std::transform(name.begin(), name.end(), name.begin(), tolower); + const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name) != duplicate.end()); if (ext == "asm") { std::string objFileName = "$(IntDir)\\"; |