mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 16:50:01 -06:00
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.
This commit is contained in:
@@ -2425,7 +2425,10 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
|
|||||||
RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE);
|
RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE);
|
||||||
|
|
||||||
std::vector<std::string> strs = cmSystemTools::tokenize(output, "\n");
|
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];
|
soname = strs[1];
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user