summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-01 18:08:12 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-01 18:08:12 (GMT)
commit16186ec18c0654d6fc2a9018553df53390bb9ff2 (patch)
treeb128754f0e3a693e007258e582eeaf3d6110fef7 /Source/cmInstallTargetGenerator.cxx
parent15741325e0393ec7a97212cf59efc3d3036c9d7d (diff)
downloadCMake-16186ec18c0654d6fc2a9018553df53390bb9ff2.zip
CMake-16186ec18c0654d6fc2a9018553df53390bb9ff2.tar.gz
CMake-16186ec18c0654d6fc2a9018553df53390bb9ff2.tar.bz2
BUG: Remove InstallNameFixupPath from cmTarget and cmInstallTargetGenerator.
- Motivation: - It depended on the order of installation - It supported only a single destination for each target - It created directory portions of an install name without user request - Updated ExportImport test to install targets in an order that expoed this bug
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 521fa4d..fb27a6d 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -280,8 +280,6 @@ cmInstallTargetGenerator
}
toDestDirPath += toInstallPath;
- this->Target->SetInstallNameFixupPath(toInstallPath.c_str());
-
os << indent << "IF(EXISTS \"" << toDestDirPath << "\")\n";
this->AddInstallNamePatchRule(os, indent.Next(), config, toDestDirPath);
this->AddChrpathPatchRule(os, indent.Next(), config, toDestDirPath);
@@ -394,23 +392,19 @@ cmInstallTargetGenerator
cmTarget* tgt = *j;
std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
std::string for_install = tgt->GetInstallNameDirForInstallTree(config);
- std::string fname = this->GetInstallFilename(tgt, config, false, true);
+ if(for_build != for_install)
+ {
+ // The directory portions differ. Append the filename to
+ // create the mapping.
+ std::string fname =
+ this->GetInstallFilename(tgt, config, false, true);
- // Map from the build-tree install_name.
- for_build += fname;
+ // Map from the build-tree install_name.
+ for_build += fname;
- // Map to the install-tree install_name.
- if (!for_install.empty())
- {
+ // Map to the install-tree install_name.
for_install += fname;
- }
- else
- {
- for_install = tgt->GetInstallNameFixupPath();
- }
- if(for_build != for_install)
- {
// Store the mapping entry.
install_name_remap[for_build] = for_install;
}
@@ -421,26 +415,27 @@ cmInstallTargetGenerator
std::string new_id;
if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
{
- std::string for_build =
+ std::string for_build =
this->Target->GetInstallNameDirForBuildTree(config);
- std::string for_install =
+ std::string for_install =
this->Target->GetInstallNameDirForInstallTree(config);
- std::string fname =
- this->GetInstallFilename(this->Target, config, this->ImportLibrary,
- true);
- for_build += fname;
- if (!for_install.empty())
- {
- for_install += fname;
- }
- else
+
+ if(this->Target->IsFrameworkOnApple() && for_install.empty())
{
- for_install = this->Target->GetInstallNameFixupPath();
+ // Frameworks seem to have an id corresponding to their own full
+ // path.
+ // ...
+ // for_install = fullDestPath_without_DESTDIR_or_name;
}
+
+ // If the install name will change on installation set the new id
+ // on the installed file.
if(for_build != for_install)
{
// Prepare to refer to the install-tree install_name.
new_id = for_install;
+ new_id += this->GetInstallFilename(this->Target, config,
+ this->ImportLibrary, true);
}
}