mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 09:59:20 -05:00
Merge topic 'rpath-on-mac'
dc1d025OS X: Add test for rpaths on Mac.8576b3fOS X: Add support for @rpath in export files.00d71bdXcode: Add rpath support in Xcode generator.94e7fefOS X: Add RPATH support for Mac.
This commit is contained in:
@@ -2242,6 +2242,29 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
buildSettings->AddAttribute("INSTALL_PATH",
|
||||
this->CreateString(install_name_dir.c_str()));
|
||||
|
||||
// Create the LD_RUNPATH_SEARCH_PATHS
|
||||
cmComputeLinkInformation* pcli = target.GetLinkInformation(configName);
|
||||
if(pcli)
|
||||
{
|
||||
std::string search_paths;
|
||||
std::vector<std::string> runtimeDirs;
|
||||
pcli->GetRPath(runtimeDirs, false);
|
||||
for(std::vector<std::string>::const_iterator i = runtimeDirs.begin();
|
||||
i != runtimeDirs.end(); ++i)
|
||||
{
|
||||
if(!search_paths.empty())
|
||||
{
|
||||
search_paths += " ";
|
||||
}
|
||||
search_paths += this->XCodeEscapePath((*i).c_str());
|
||||
}
|
||||
if(!search_paths.empty())
|
||||
{
|
||||
buildSettings->AddAttribute("LD_RUNPATH_SEARCH_PATHS",
|
||||
this->CreateString(search_paths.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
buildSettings->AddAttribute("OTHER_LDFLAGS",
|
||||
this->CreateString(extraLinkOptions.c_str()));
|
||||
buildSettings->AddAttribute("OTHER_REZFLAGS",
|
||||
|
||||
Reference in New Issue
Block a user