BUG: use full paths via pwd for -L paths on unix shells
This commit is contained in:
parent
06bf73f9c3
commit
f3c42f593e
|
@ -697,6 +697,16 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
||||||
std::string libpath = this->ConvertToOutputForExisting(libDir->c_str());
|
std::string libpath = this->ConvertToOutputForExisting(libDir->c_str());
|
||||||
if(emitted.insert(libpath).second)
|
if(emitted.insert(libpath).second)
|
||||||
{
|
{
|
||||||
|
std::string fullLibPath;
|
||||||
|
if(!m_WindowsShell)
|
||||||
|
{
|
||||||
|
fullLibPath = "\"`cd ";
|
||||||
|
}
|
||||||
|
fullLibPath += libpath;
|
||||||
|
if(!m_WindowsShell)
|
||||||
|
{
|
||||||
|
fullLibPath += ";pwd`\"";
|
||||||
|
}
|
||||||
std::string::size_type pos = libDir->find(libPathFlag.c_str());
|
std::string::size_type pos = libDir->find(libPathFlag.c_str());
|
||||||
if((pos == std::string::npos || pos > 0)
|
if((pos == std::string::npos || pos > 0)
|
||||||
&& libDir->find("${") == std::string::npos)
|
&& libDir->find("${") == std::string::npos)
|
||||||
|
@ -704,13 +714,10 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
||||||
linkLibs += libPathFlag;
|
linkLibs += libPathFlag;
|
||||||
if(outputRuntime)
|
if(outputRuntime)
|
||||||
{
|
{
|
||||||
std::string rpath = "\"`cd ";
|
runtimeDirs.push_back( fullLibPath );
|
||||||
rpath += libpath;
|
|
||||||
rpath += ";pwd`\"";
|
|
||||||
runtimeDirs.push_back( rpath );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
linkLibs += libpath;
|
linkLibs += fullLibPath;
|
||||||
linkLibs += " ";
|
linkLibs += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue