mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
OS X: Make sure RPATHs are unique to avoid possible corruption.
When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
This commit is contained in:
@@ -902,3 +902,20 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
|
||||
this->insert(*ti);
|
||||
}
|
||||
}
|
||||
|
||||
std::string cmGlobalVisualStudioGenerator::ExpandCFGIntDir(
|
||||
const std::string& str,
|
||||
const std::string& config) const
|
||||
{
|
||||
std::string replace = GetCMakeCFGIntDir();
|
||||
|
||||
std::string tmp = str;
|
||||
for(std::string::size_type i = tmp.find(replace);
|
||||
i != std::string::npos;
|
||||
i = tmp.find(replace, i))
|
||||
{
|
||||
tmp.replace(i, replace.size(), config);
|
||||
i += config.size();
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user