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.
This commit is contained in:
parent
47aa926523
commit
0e03bd1ab4
|
@ -489,10 +489,17 @@ cmInstallTargetGenerator
|
||||||
for(std::set<cmTarget*>::const_iterator j = sharedLibs.begin();
|
for(std::set<cmTarget*>::const_iterator j = sharedLibs.begin();
|
||||||
j != sharedLibs.end(); ++j)
|
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
|
// If the build tree and install tree use different path
|
||||||
// components of the install_name field then we need to create a
|
// components of the install_name field then we need to create a
|
||||||
// mapping to be applied after installation.
|
// mapping to be applied after installation.
|
||||||
cmTarget* tgt = *j;
|
|
||||||
std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
|
std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
|
||||||
std::string for_install = tgt->GetInstallNameDirForInstallTree(config);
|
std::string for_install = tgt->GetInstallNameDirForInstallTree(config);
|
||||||
if(for_build != for_install)
|
if(for_build != for_install)
|
||||||
|
|
Loading…
Reference in New Issue