summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-16 20:28:30 (GMT)
committerBrad King <brad.king@kitware.com>2007-03-16 20:28:30 (GMT)
commit7fb8ac89041e1f2e1193295800d722c3a7a6cd6e (patch)
tree47f8a667f8812de22198bc415ba99ffadc84b500 /Source/cmInstallTargetGenerator.cxx
parent861e3a710797948061b5f119afbc55ed583a2e8c (diff)
downloadCMake-7fb8ac89041e1f2e1193295800d722c3a7a6cd6e.zip
CMake-7fb8ac89041e1f2e1193295800d722c3a7a6cd6e.tar.gz
CMake-7fb8ac89041e1f2e1193295800d722c3a7a6cd6e.tar.bz2
BUG: Use GetExecutableNames instead of GetLibraryNames to compute the installation file name for executable targets.
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx96
1 files changed, 61 insertions, 35 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index fd585da..3acabec 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -204,27 +204,40 @@ cmInstallTargetGenerator
}
// Compute the name of the library.
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameReal;
- std::string targetNameImport;
- std::string targetNamePDB;
- target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
- targetNameImport, targetNamePDB, i->c_str());
- if(this->ImportLibrary)
- {
- // Use the import library name.
- fname += targetNameImport;
- }
- else if(useSOName)
+ if(target->GetType() == cmTarget::EXECUTABLE)
{
- // Use the soname.
- fname += targetNameSO;
+ std::string targetName;
+ std::string targetNameReal;
+ std::string targetNamePDB;
+ target->GetExecutableNames(targetName, targetNameReal,
+ targetNamePDB, i->c_str());
+ // Use the canonical name.
+ fname += targetName;
}
else
{
- // Use the canonical name.
- fname += targetName;
+ std::string targetName;
+ std::string targetNameSO;
+ std::string targetNameReal;
+ std::string targetNameImport;
+ std::string targetNamePDB;
+ target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
+ targetNameImport, targetNamePDB, i->c_str());
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ fname += targetNameImport;
+ }
+ else if(useSOName)
+ {
+ // Use the soname.
+ fname += targetNameSO;
+ }
+ else
+ {
+ // Use the canonical name.
+ fname += targetName;
+ }
}
// Set a variable with the target name for this configuration.
@@ -242,28 +255,41 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
if(this->ConfigurationTypes->empty())
{
// Reference the target by its one configuration name.
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameReal;
- std::string targetNameImport;
- std::string targetNamePDB;
- target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
- targetNameImport, targetNamePDB,
- this->ConfigurationName);
- if(this->ImportLibrary)
- {
- // Use the import library name.
- return targetNameImport;
- }
- else if(useSOName)
+ if(target->GetType() == cmTarget::EXECUTABLE)
{
- // Use the soname.
- return targetNameSO;
+ std::string targetName;
+ std::string targetNameReal;
+ std::string targetNamePDB;
+ target->GetExecutableNames(targetName, targetNameReal,
+ targetNamePDB, this->ConfigurationName);
+ // Use the canonical name.
+ return targetName;
}
else
{
- // Use the canonical name.
- return targetName;
+ std::string targetName;
+ std::string targetNameSO;
+ std::string targetNameReal;
+ std::string targetNameImport;
+ std::string targetNamePDB;
+ target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
+ targetNameImport, targetNamePDB,
+ this->ConfigurationName);
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ return targetNameImport;
+ }
+ else if(useSOName)
+ {
+ // Use the soname.
+ return targetNameSO;
+ }
+ else
+ {
+ // Use the canonical name.
+ return targetName;
+ }
}
}
else