Merge topic 'rpath-on-mac'

ff01f8b OS X: Improvements for getting install name of dylib.
This commit is contained in:
Brad King 2013-06-14 08:59:54 -04:00 committed by CMake Topic Stage
commit bc3a7b61e2
1 changed files with 4 additions and 1 deletions

View File

@ -2425,7 +2425,10 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE);
std::vector<std::string> strs = cmSystemTools::tokenize(output, "\n");
if(strs.size() == 2)
// otool returns extra lines reporting multiple install names
// in case the binary is multi-arch and none of the architectures
// is native (e.g. i386;ppc on x86_64)
if(strs.size() >= 2)
{
soname = strs[1];
return true;