summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx32
1 files changed, 26 insertions, 6 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 3acabec..fd92eab 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -208,11 +208,21 @@ cmInstallTargetGenerator
{
std::string targetName;
std::string targetNameReal;
+ std::string targetNameImport;
std::string targetNamePDB;
target->GetExecutableNames(targetName, targetNameReal,
- targetNamePDB, i->c_str());
- // Use the canonical name.
- fname += targetName;
+ targetNameImport, targetNamePDB,
+ i->c_str());
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ fname += targetNameImport;
+ }
+ else
+ {
+ // Use the canonical name.
+ fname += targetName;
+ }
}
else
{
@@ -259,11 +269,21 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
{
std::string targetName;
std::string targetNameReal;
+ std::string targetNameImport;
std::string targetNamePDB;
target->GetExecutableNames(targetName, targetNameReal,
- targetNamePDB, this->ConfigurationName);
- // Use the canonical name.
- return targetName;
+ targetNameImport, targetNamePDB,
+ this->ConfigurationName);
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ return targetNameImport;
+ }
+ else
+ {
+ // Use the canonical name.
+ return targetName;
+ }
}
else
{