summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-06-06 03:31:11 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2013-06-06 03:31:11 (GMT)
commitff01f8b60025cca88ebcba9b83ab9492b1521c2c (patch)
tree741e6b5b0eea5bc64405dae0fe00c71026b1ceb3 /Source/cmSystemTools.cxx
parentdc1d025197d48829f2c0389824c8273b9e257413 (diff)
downloadCMake-ff01f8b60025cca88ebcba9b83ab9492b1521c2c.zip
CMake-ff01f8b60025cca88ebcba9b83ab9492b1521c2c.tar.gz
CMake-ff01f8b60025cca88ebcba9b83ab9492b1521c2c.tar.bz2
OS X: Improvements for getting install name of dylib.
In the case of a multi-arch dylib where none of the architectures is the host architecture, otool -D returned multiple install names.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 803d0da..21c361d 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -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;