diff options
author | Brad King <brad.king@kitware.com> | 2013-07-29 13:55:15 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-29 13:55:15 (GMT) |
commit | 3c683d788da247d669226f49aa1a5e0ec8ca8651 (patch) | |
tree | e429fbcf0b742c807db1e31d0d860b65141b7486 | |
parent | 64bb8f4d19bd9e07ba7ee6454e7abbf713dc3649 (diff) | |
parent | 84698abb514b665c5db5111ecf247d44b9979844 (diff) | |
download | CMake-3c683d788da247d669226f49aa1a5e0ec8ca8651.zip CMake-3c683d788da247d669226f49aa1a5e0ec8ca8651.tar.gz CMake-3c683d788da247d669226f49aa1a5e0ec8ca8651.tar.bz2 |
Merge topic 'rpath-on-mac'
84698ab OS X: If necessary, use xcrun to help find otool used to query install names.
-rw-r--r-- | Source/cmSystemTools.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c52c266..37344dc 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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 |