summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 68dd586..fabcb0a 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -489,10 +489,17 @@ cmInstallTargetGenerator
for(std::set<cmTarget*>::const_iterator j = sharedLibs.begin();
j != sharedLibs.end(); ++j)
{
+ cmTarget* tgt = *j;
+
+ // The install_name of an imported target does not change.
+ if(tgt->IsImported())
+ {
+ continue;
+ }
+
// If the build tree and install tree use different path
// components of the install_name field then we need to create a
// mapping to be applied after installation.
- cmTarget* tgt = *j;
std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
std::string for_install = tgt->GetInstallNameDirForInstallTree(config);
if(for_build != for_install)