BUG: Fix install_name_tool update of the executable in an installed bundle on OSX. This addresses bug#4534.
This commit is contained in:
parent
611f86b7f6
commit
39d1343896
|
@ -178,6 +178,13 @@ cmInstallTargetGenerator
|
||||||
const char* config,
|
const char* config,
|
||||||
Indent const& indent)
|
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.
|
// Compute the list of files to install for this target.
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
std::string literal_args;
|
std::string literal_args;
|
||||||
|
@ -214,6 +221,9 @@ cmInstallTargetGenerator
|
||||||
from1 += ".app";
|
from1 += ".app";
|
||||||
files.push_back(from1);
|
files.push_back(from1);
|
||||||
type = cmTarget::INSTALL_DIRECTORY;
|
type = cmTarget::INSTALL_DIRECTORY;
|
||||||
|
toFullPath += ".app/Contents/MacOS/";
|
||||||
|
toFullPath += this->GetInstallFilename(this->Target, config,
|
||||||
|
this->ImportLibrary, false);
|
||||||
literal_args += " USE_SOURCE_PERMISSIONS";
|
literal_args += " USE_SOURCE_PERMISSIONS";
|
||||||
// TODO: Still need to apply install_name_tool and stripping
|
// TODO: Still need to apply install_name_tool and stripping
|
||||||
// to binaries inside bundle.
|
// to binaries inside bundle.
|
||||||
|
@ -284,12 +294,6 @@ cmInstallTargetGenerator
|
||||||
no_rename, literal_args.c_str(),
|
no_rename, literal_args.c_str(),
|
||||||
indent);
|
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";
|
os << indent << "IF(EXISTS \"" << toFullPath << "\")\n";
|
||||||
this->AddInstallNamePatchRule(os, indent.Next(), config, toFullPath);
|
this->AddInstallNamePatchRule(os, indent.Next(), config, toFullPath);
|
||||||
this->AddRanlibRule(os, indent.Next(), type, toFullPath);
|
this->AddRanlibRule(os, indent.Next(), type, toFullPath);
|
||||||
|
|
Loading…
Reference in New Issue