summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-05-10 17:58:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-05-10 17:58:15 (GMT)
commita4d935933bf93f6878b58c582a009134065475d5 (patch)
tree636a1099efa3ec9905d3b544cd56ea2830466755 /Source
parentc32262bc040837d7abe80a1f003887485ad43261 (diff)
parenta7d8d49b8fc829e76686cbc4cc808db4a8542994 (diff)
downloadCMake-a4d935933bf93f6878b58c582a009134065475d5.zip
CMake-a4d935933bf93f6878b58c582a009134065475d5.tar.gz
CMake-a4d935933bf93f6878b58c582a009134065475d5.tar.bz2
Merge topic 'FixVirtualFoldersInEclipse'
a7d8d49 -fix VirtualFolders in Eclipse under Windows
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx15
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h3
2 files changed, 13 insertions, 5 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index c4ea425..8e26b8e 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<cmStdString, std::vector<cmLocalGenerator*> >::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<link>\n"
"\t\t\t<name>"
<< cmExtraEclipseCDT4Generator::EscapeForXML(name)
<< "</name>\n"
"\t\t\t<type>2</type>\n"
- "\t\t\t<locationURI>"
+ "\t\t\t<" << locationTag << ">"
<< cmExtraEclipseCDT4Generator::EscapeForXML(path)
- << "</locationURI>\n"
+ << "</" << locationTag << ">\n"
"\t\t</link>\n"
;
}
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 99e69c4..a683731 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,