Skip to content
Snippets Groups Projects
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
error

  GetLibraryNamesInternal called on imported target: kdelibs

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