diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index c4ea42514..8e26b8ee2 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -403,7 +403,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() // for each sub project create a linked resource to the source dir // - only if it is an out-of-source build this->AppendLinkedResource(fout, "[Subprojects]", - "virtual:/virtual"); + "virtual:/virtual", true); for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); @@ -1082,17 +1082,24 @@ void cmExtraEclipseCDT4Generator void cmExtraEclipseCDT4Generator ::AppendLinkedResource (cmGeneratedFileStream& fout, const std::string& name, - const std::string& path) + const std::string& path, + bool isVirtualFolder) { + const char* locationTag = "location"; + if (isVirtualFolder) // ... and not a linked folder + { + locationTag = "locationURI"; + } + fout << "\t\t\n" "\t\t\t" << cmExtraEclipseCDT4Generator::EscapeForXML(name) << "\n" "\t\t\t2\n" - "\t\t\t" + "\t\t\t<" << locationTag << ">" << cmExtraEclipseCDT4Generator::EscapeForXML(path) - << "\n" + << "\n" "\t\t\n" ; } diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 99e69c42a..a6837313b 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -87,7 +87,8 @@ private: static void AppendLinkedResource (cmGeneratedFileStream& fout, const std::string& name, - const std::string& path); + const std::string& path, + bool isVirtualFolder = false); bool AppendOutLinkedResource(cmGeneratedFileStream& fout, const std::string& defname,