summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmInstallTargetGenerator.cxx1
-rw-r--r--Source/cmInstallTargetsCommand.cxx1
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmTarget.h9
4 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 9db1856..2ac52ff 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -26,6 +26,7 @@ cmInstallTargetGenerator
::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib):
Target(&t), Destination(dest), ImportLibrary(implib)
{
+ this->Target->SetHaveInstallRule(true);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx
index 0216c4d..b86d1f3 100644
--- a/Source/cmInstallTargetsCommand.cxx
+++ b/Source/cmInstallTargetsCommand.cxx
@@ -46,6 +46,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
{
tgts[*s].SetInstallPath(args[0].c_str());
tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str());
+ tgts[*s].SetHaveInstallRule(true);
}
else
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 985dd98..4238a53 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -30,6 +30,7 @@ cmTarget::cmTarget()
m_Makefile = 0;
m_LinkLibrariesAnalyzed = false;
m_LinkDirectoriesComputed = false;
+ m_HaveInstallRule = false;
}
void cmTarget::SetType(TargetType type, const char* name)
@@ -1390,7 +1391,7 @@ bool cmTarget::NeedRelinkBeforeInstall()
// If there is no install location this target will not be installed
// and therefore does not need relinking.
- if(this->GetInstallPath().empty())
+ if(!this->GetHaveInstallRule())
{
return false;
}
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 1d061f5..a0af8c4 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -129,7 +129,13 @@ public:
*/
std::string GetRuntimeInstallPath() {return m_RuntimeInstallPath;}
void SetRuntimeInstallPath(const char *name) {m_RuntimeInstallPath = name;}
-
+
+ /**
+ * Get/Set whether there is an install rule for this target.
+ */
+ bool GetHaveInstallRule() { return m_HaveInstallRule; }
+ void SetHaveInstallRule(bool h) { m_HaveInstallRule = h; }
+
/**
* Generate the SourceFilesList from the SourceLists. This should only be
* done once to be safe.
@@ -309,6 +315,7 @@ private:
std::vector<std::string> m_Frameworks;
std::vector<std::string> m_LinkDirectories;
std::vector<std::string> m_ExplicitLinkDirectories;
+ bool m_HaveInstallRule;
std::string m_InstallPath;
std::string m_RuntimeInstallPath;
std::string m_Directory;