diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 8d13e11..aa4d1c2 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -52,6 +52,10 @@ # include <cmsys/MD5.h> #endif +#if defined(CMAKE_USE_ELF_PARSER) +# include "cmELF.h" +#endif + #if defined(__sgi) && !defined(__GNUC__) # pragma set woff 1375 /* base class destructor not virtual */ #endif @@ -2155,6 +2159,16 @@ void cmSystemTools::MakefileColorEcho(int color, const char* message, bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath, std::string& soname) { + // For ELF shared libraries use a real parser to get the correct + // soname. +#if defined(CMAKE_USE_ELF_PARSER) + cmELF elf(fullPath.c_str()); + if(elf) + { + return elf.GetSOName(soname); + } +#endif + // If the file is not a symlink we have no guess for its soname. if(!cmSystemTools::FileIsSymlink(fullPath.c_str())) { |