BUG: Use GetExecutableNames instead of GetLibraryNames to compute the installation file name for executable targets.
This commit is contained in:
parent
861e3a7107
commit
7fb8ac8904
|
@ -204,6 +204,18 @@ cmInstallTargetGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the name of the library.
|
// Compute the name of the library.
|
||||||
|
if(target->GetType() == cmTarget::EXECUTABLE)
|
||||||
|
{
|
||||||
|
std::string targetName;
|
||||||
|
std::string targetNameReal;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target->GetExecutableNames(targetName, targetNameReal,
|
||||||
|
targetNamePDB, i->c_str());
|
||||||
|
// Use the canonical name.
|
||||||
|
fname += targetName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
std::string targetName;
|
std::string targetName;
|
||||||
std::string targetNameSO;
|
std::string targetNameSO;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
|
@ -226,6 +238,7 @@ cmInstallTargetGenerator
|
||||||
// Use the canonical name.
|
// Use the canonical name.
|
||||||
fname += targetName;
|
fname += targetName;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set a variable with the target name for this configuration.
|
// Set a variable with the target name for this configuration.
|
||||||
os << "SET(" << target->GetName() << "_" << place
|
os << "SET(" << target->GetName() << "_" << place
|
||||||
|
@ -242,6 +255,18 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
|
||||||
if(this->ConfigurationTypes->empty())
|
if(this->ConfigurationTypes->empty())
|
||||||
{
|
{
|
||||||
// Reference the target by its one configuration name.
|
// Reference the target by its one configuration name.
|
||||||
|
if(target->GetType() == cmTarget::EXECUTABLE)
|
||||||
|
{
|
||||||
|
std::string targetName;
|
||||||
|
std::string targetNameReal;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target->GetExecutableNames(targetName, targetNameReal,
|
||||||
|
targetNamePDB, this->ConfigurationName);
|
||||||
|
// Use the canonical name.
|
||||||
|
return targetName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
std::string targetName;
|
std::string targetName;
|
||||||
std::string targetNameSO;
|
std::string targetNameSO;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
|
@ -266,6 +291,7 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
|
||||||
return targetName;
|
return targetName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Reference the target using the per-configuration variable.
|
// Reference the target using the per-configuration variable.
|
||||||
|
|
Loading…
Reference in New Issue