mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-15 22:35:33 -05:00
OS X: If necessary, use xcrun to help find otool used to query install names.
This fixes querying for @rpath install names when using Xcode without the command line tools installed.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user