Commit 0e03bd1a authored by Brad King's avatar Brad King 💬
Browse files

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

  GetLibraryNamesInternal called on imported target: kdelibs

seen by kde folks.
parent 47aa9265
......@@ -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 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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment