diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2017-02-24 16:31:24 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2017-02-28 21:38:29 (GMT) |
commit | 7202db5db46bfe7499244af315249820e883c8cf (patch) | |
tree | 319c16d7693ec22fc0af46337c0610bcc30a4f38 /Source/cmXCodeScheme.cxx | |
parent | 5995082101a1959f303f9f3d6c0a1e483630749e (diff) | |
download | CMake-7202db5db46bfe7499244af315249820e883c8cf.zip CMake-7202db5db46bfe7499244af315249820e883c8cf.tar.gz CMake-7202db5db46bfe7499244af315249820e883c8cf.tar.bz2 |
Xcode: Fix schema container location calculation
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r-- | Source/cmXCodeScheme.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
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 |