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:
Clinton Stimpson
2014-02-01 21:18:04 -07:00
parent 6385c71516
commit 028a5285d8
7 changed files with 94 additions and 11 deletions
+17
View File
@@ -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;
}