summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-11-25 21:50:48 (GMT)
committerBrad King <brad.king@kitware.com>2008-11-25 21:50:48 (GMT)
commit0e03bd1ab4789081050761342d5fdf4aa9cf0824 (patch)
treeac9f35335124a8a3107b834a3689713d979bb850 /Source/cmInstallTargetGenerator.cxx
parent47aa926523131ca59a64c6342b37c563d6a942f0 (diff)
downloadCMake-0e03bd1ab4789081050761342d5fdf4aa9cf0824.zip
CMake-0e03bd1ab4789081050761342d5fdf4aa9cf0824.tar.gz
CMake-0e03bd1ab4789081050761342d5fdf4aa9cf0824.tar.bz2
BUG: Do not map install_name of imported targets
When we install a target on Mac, we generate a call to install_name_tool to fix install_name entries in the target for shared libraries it links. This change makes the step ignore entries for imported targets since their install_name will not change and cmTarget cannot produce a mapping for them. This fixes the error GetLibraryNamesInternal called on imported target: kdelibs seen by kde folks.
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)