Merge topic 'rpath-on-mac'

84698ab OS X: If necessary, use xcrun to help find otool used to query install names.
This commit is contained in:
Brad King 2013-07-29 09:55:15 -04:00 committed by CMake Topic Stage
commit 3c683d788d
1 changed files with 9 additions and 1 deletions

View File

@ -2464,7 +2464,15 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
cmds.push_back(fullPath.c_str());
std::string output;
RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE);
if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE))
{
cmds.insert(cmds.begin(), "-r");
cmds.insert(cmds.begin(), "xcrun");
if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE))
{
return false;
}
}
std::vector<std::string> strs = cmSystemTools::tokenize(output, "\n");
// otool returns extra lines reporting multiple install names