From 84698abb514b665c5db5111ecf247d44b9979844 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Fri, 26 Jul 2013 22:17:30 -0600 Subject: 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. --- Source/cmSystemTools.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 strs = cmSystemTools::tokenize(output, "\n"); // otool returns extra lines reporting multiple install names -- cgit v0.12