summaryrefslogtreecommitdiff
path: root/Source/cmInstallTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-07-02 11:31:10 -0400
committerBrad King <brad.king@kitware.com>2007-07-02 11:31:10 -0400
commit39d1343896847d2e5dbd94ceaaa3033dd53bdd17 (patch)
treefd91d6a90fa67c886895caa9fbcedc6e146cc6ae /Source/cmInstallTargetGenerator.cxx
parent611f86b7f6ba92c9e7eaa589dcda337407d84415 (diff)
downloadcmake-39d1343896847d2e5dbd94ceaaa3033dd53bdd17.tar.gz
BUG: Fix install_name_tool update of the executable in an installed bundle on OSX. This addresses bug#4534.
Diffstat (limited to 'Source/cmInstallTargetGenerator.cxx')
-rw-r--r--Source/cmInstallTargetGenerator.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 9df0a04084..15a89912d5 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -178,6 +178,13 @@ cmInstallTargetGenerator
const char* config,
Indent const& indent)
{
+ // Compute the full path to the main installed file for this target.
+ std::string toFullPath = "$ENV{DESTDIR}";
+ toFullPath += this->Destination;
+ toFullPath += "/";
+ toFullPath += this->GetInstallFilename(this->Target, config,
+ this->ImportLibrary, false);
+
// Compute the list of files to install for this target.
std::vector<std::string> files;
std::string literal_args;
@@ -214,6 +221,9 @@ cmInstallTargetGenerator
from1 += ".app";
files.push_back(from1);
type = cmTarget::INSTALL_DIRECTORY;
+ toFullPath += ".app/Contents/MacOS/";
+ toFullPath += this->GetInstallFilename(this->Target, config,
+ this->ImportLibrary, false);
literal_args += " USE_SOURCE_PERMISSIONS";
// TODO: Still need to apply install_name_tool and stripping
// to binaries inside bundle.
@@ -284,12 +294,6 @@ cmInstallTargetGenerator
no_rename, literal_args.c_str(),
indent);
- std::string toFullPath = "$ENV{DESTDIR}";
- toFullPath += this->Destination;
- toFullPath += "/";
- toFullPath += this->GetInstallFilename(this->Target, config,
- this->ImportLibrary, false);
-
os << indent << "IF(EXISTS \"" << toFullPath << "\")\n";
this->AddInstallNamePatchRule(os, indent.Next(), config, toFullPath);
this->AddRanlibRule(os, indent.Next(), type, toFullPath);