summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmGlobalXCodeGenerator.h3
-rw-r--r--Source/cmXCodeScheme.cxx20
-rw-r--r--Source/cmXCodeScheme.h8
4 files changed, 18 insertions, 19 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f0ebf88..b023d5c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3344,7 +3344,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
if (this->GetCMakeInstance()->GetState()->GetGlobalPropertyAsBool(
"XCODE_GENERATE_SCHEME") &&
this->XcodeVersion >= 70) {
- this->OutputXCodeSharedSchemes(xcodeDir, root);
+ this->OutputXCodeSharedSchemes(xcodeDir);
this->OutputXCodeWorkspaceSettings(xcodeDir);
}
@@ -3357,7 +3357,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
}
void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
- const std::string& xcProjDir, cmLocalGenerator* root)
+ const std::string& xcProjDir)
{
for (std::vector<cmXCodeObject*>::const_iterator i =
this->XCodeObjects.begin();
@@ -3369,7 +3369,7 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
cmXCodeScheme schm(obj, this->CurrentConfigurationTypes,
this->XcodeVersion);
schm.WriteXCodeSharedScheme(xcProjDir,
- root->GetCurrentSourceDirectory());
+ this->RelativeToSource(xcProjDir.c_str()));
}
}
}
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index dcbc77a..9eacdef 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -166,8 +166,7 @@ private:
void OutputXCodeProject(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
// Write shared scheme files for all the native targets
- void OutputXCodeSharedSchemes(const std::string& xcProjDir,
- cmLocalGenerator* root);
+ void OutputXCodeSharedSchemes(const std::string& xcProjDir);
void OutputXCodeWorkspaceSettings(const std::string& xcProjDir);
void WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index c2d49d8..e5031fd 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -3,6 +3,7 @@
#include "cmXCodeScheme.h"
#include <iomanip>
+#include <iostream>
#include <sstream>
#include "cmGeneratedFileStream.h"
@@ -20,7 +21,7 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj,
}
void cmXCodeScheme::WriteXCodeSharedScheme(const std::string& xcProjDir,
- const std::string sourceRoot)
+ const std::string& container)
{
// Create shared scheme sub-directory tree
//
@@ -39,12 +40,11 @@ void cmXCodeScheme::WriteXCodeSharedScheme(const std::string& xcProjDir,
return;
}
- std::string xcProjRelDir = xcProjDir.substr(sourceRoot.size() + 1);
- WriteXCodeXCScheme(fout, xcProjRelDir);
+ WriteXCodeXCScheme(fout, container);
}
void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout,
- const std::string& xcProjDir)
+ const std::string& container)
{
cmXMLWriter xout(fout);
xout.SetIndentationElement(std::string(3, ' '));
@@ -55,9 +55,9 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout,
xout.Attribute("LastUpgradeVersion", WriteVersionString());
xout.Attribute("version", "1.3");
- WriteBuildAction(xout, xcProjDir);
+ WriteBuildAction(xout, container);
WriteTestAction(xout, FindConfiguration("Debug"));
- WriteLaunchAction(xout, FindConfiguration("Debug"), xcProjDir);
+ WriteLaunchAction(xout, FindConfiguration("Debug"), container);
WriteProfileAction(xout, FindConfiguration("Release"));
WriteAnalyzeAction(xout, FindConfiguration("Debug"));
WriteArchiveAction(xout, FindConfiguration("Release"));
@@ -66,7 +66,7 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout,
}
void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout,
- const std::string& xcProjDir)
+ const std::string& container)
{
xout.StartElement("BuildAction");
xout.BreakAttributes();
@@ -88,7 +88,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout,
xout.Attribute("BlueprintIdentifier", this->TargetId);
xout.Attribute("BuildableName", this->TargetName);
xout.Attribute("BlueprintName", this->TargetName);
- xout.Attribute("ReferencedContainer", "container:" + xcProjDir);
+ xout.Attribute("ReferencedContainer", "container:" + container);
xout.EndElement();
xout.EndElement(); // BuildActionEntry
@@ -119,7 +119,7 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
std::string configuration,
- const std::string& xcProjDir)
+ const std::string& container)
{
xout.StartElement("LaunchAction");
xout.BreakAttributes();
@@ -143,7 +143,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
xout.Attribute("BlueprintIdentifier", this->TargetId);
xout.Attribute("BuildableName", this->TargetName);
xout.Attribute("BlueprintName", this->TargetName);
- xout.Attribute("ReferencedContainer", "container:" + xcProjDir);
+ xout.Attribute("ReferencedContainer", "container:" + container);
xout.EndElement();
xout.EndElement(); // MacroExpansion
diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h
index b174c51..7a7d930 100644
--- a/Source/cmXCodeScheme.h
+++ b/Source/cmXCodeScheme.h
@@ -21,7 +21,7 @@ public:
unsigned int xcVersion);
void WriteXCodeSharedScheme(const std::string& xcProjDir,
- const std::string sourceRoot);
+ const std::string& container);
private:
const std::string& TargetName;
@@ -29,12 +29,12 @@ private:
const std::vector<std::string>& ConfigList;
const unsigned int XcodeVersion;
- void WriteXCodeXCScheme(std::ostream& fout, const std::string& xcProjDir);
+ void WriteXCodeXCScheme(std::ostream& fout, const std::string& container);
- void WriteBuildAction(cmXMLWriter& xout, const std::string& xcProjDir);
+ void WriteBuildAction(cmXMLWriter& xout, const std::string& container);
void WriteTestAction(cmXMLWriter& xout, std::string configuration);
void WriteLaunchAction(cmXMLWriter& xout, std::string configuration,
- const std::string& xcProjDir);
+ const std::string& container);
void WriteProfileAction(cmXMLWriter& xout, std::string configuration);
void WriteAnalyzeAction(cmXMLWriter& xout, std::string configuration);
void WriteArchiveAction(cmXMLWriter& xout, std::string configuration);