summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmInstallTargetsCommand.cxx2
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/cmTarget.h5
3 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx
index d721ca0..8f417db 100644
--- a/Source/cmInstallTargetsCommand.cxx
+++ b/Source/cmInstallTargetsCommand.cxx
@@ -40,7 +40,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args,
} else {
cmTargets::iterator ti = tgts.find(*s);
if (ti != tgts.end()) {
- ti->second.SetInstallPath(args[0].c_str());
+ ti->second.SetInstallPath(args[0]);
ti->second.SetRuntimeInstallPath(runtime_dir.c_str());
ti->second.SetHaveInstallRule(true);
} else {
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ebf5e6d..fa0e3e7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -169,6 +169,7 @@ public:
cmMakefile* Makefile;
cmPolicies::PolicyMap PolicyMap;
std::string Name;
+ std::string InstallPath;
cmPropertyMap Properties;
std::set<BT<std::string>> Utilities;
std::set<std::string> SystemIncludeDirectories;
@@ -773,6 +774,16 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const
}
}
+std::string const& cmTarget::GetInstallPath() const
+{
+ return impl->InstallPath;
+}
+
+void cmTarget::SetInstallPath(std::string const& name)
+{
+ impl->InstallPath = name;
+}
+
cmTarget::LinkLibraryVectorType const& cmTarget::GetOriginalLinkLibraries()
const
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index f9dd83e..7dfedf1 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -154,8 +154,8 @@ public:
* Set the path where this target should be installed. This is relative to
* INSTALL_PREFIX
*/
- std::string GetInstallPath() const { return this->InstallPath; }
- void SetInstallPath(const char* name) { this->InstallPath = name; }
+ std::string const& GetInstallPath() const;
+ void SetInstallPath(std::string const& name);
/**
* Set the path where this target (if it has a runtime part) should be
@@ -297,7 +297,6 @@ private:
private:
bool IsGeneratorProvided;
- std::string InstallPath;
std::string RuntimeInstallPath;
std::vector<cmCustomCommand> PreBuildCommands;
std::vector<cmCustomCommand> PreLinkCommands;