BUG: Fixed relink with new install framework.

This commit is contained in:
Brad King 2006-02-19 17:27:47 -05:00
parent b6e4bc0521
commit 8dd00d5b1e
4 changed files with 12 additions and 2 deletions

View File

@ -26,6 +26,7 @@ cmInstallTargetGenerator
::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib): ::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib):
Target(&t), Destination(dest), ImportLibrary(implib) Target(&t), Destination(dest), ImportLibrary(implib)
{ {
this->Target->SetHaveInstallRule(true);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -46,6 +46,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
{ {
tgts[*s].SetInstallPath(args[0].c_str()); tgts[*s].SetInstallPath(args[0].c_str());
tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str()); tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str());
tgts[*s].SetHaveInstallRule(true);
} }
else else
{ {

View File

@ -30,6 +30,7 @@ cmTarget::cmTarget()
m_Makefile = 0; m_Makefile = 0;
m_LinkLibrariesAnalyzed = false; m_LinkLibrariesAnalyzed = false;
m_LinkDirectoriesComputed = false; m_LinkDirectoriesComputed = false;
m_HaveInstallRule = false;
} }
void cmTarget::SetType(TargetType type, const char* name) 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 // If there is no install location this target will not be installed
// and therefore does not need relinking. // and therefore does not need relinking.
if(this->GetInstallPath().empty()) if(!this->GetHaveInstallRule())
{ {
return false; return false;
} }

View File

@ -129,7 +129,13 @@ public:
*/ */
std::string GetRuntimeInstallPath() {return m_RuntimeInstallPath;} std::string GetRuntimeInstallPath() {return m_RuntimeInstallPath;}
void SetRuntimeInstallPath(const char *name) {m_RuntimeInstallPath = name;} 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 * Generate the SourceFilesList from the SourceLists. This should only be
* done once to be safe. * done once to be safe.
@ -309,6 +315,7 @@ private:
std::vector<std::string> m_Frameworks; std::vector<std::string> m_Frameworks;
std::vector<std::string> m_LinkDirectories; std::vector<std::string> m_LinkDirectories;
std::vector<std::string> m_ExplicitLinkDirectories; std::vector<std::string> m_ExplicitLinkDirectories;
bool m_HaveInstallRule;
std::string m_InstallPath; std::string m_InstallPath;
std::string m_RuntimeInstallPath; std::string m_RuntimeInstallPath;
std::string m_Directory; std::string m_Directory;