ENH: In cmSystemTools::ChangeRPath check for the RUNPATH if RPATH does not exist.

This commit is contained in:
Brad King 2008-03-02 16:19:26 -05:00
parent d732de4a8a
commit 34a338dcc1
1 changed files with 6 additions and 1 deletions

View File

@ -2208,7 +2208,12 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
std::string rpathSuffix;
{
cmELF elf(file.c_str());
if(cmELF::StringEntry const* se = elf.GetRPath())
cmELF::StringEntry const* se = elf.GetRPath();
if(!se)
{
se = elf.GetRunPath();
}
if(se)
{
// Make sure the current rpath begins with the old rpath.
if(se->Value.length() < oldRPath.length() ||