ENH: use cd pwd trick for path for libnames
This commit is contained in:
parent
f3c42f593e
commit
fbd0bafca7
@ -1072,15 +1072,26 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
|
|||||||
targetName, targetNameSO,
|
targetName, targetNameSO,
|
||||||
targetNameReal, targetNameBase);
|
targetNameReal, targetNameBase);
|
||||||
|
|
||||||
|
std::string outpath;
|
||||||
|
std::string outdir = this->ConvertToRelativeOutputPath(m_LibraryOutputPath.c_str());
|
||||||
|
if(!m_WindowsShell && outdir.size())
|
||||||
|
{
|
||||||
|
outpath = "\"`cd ";
|
||||||
|
}
|
||||||
|
outpath += outdir;
|
||||||
|
if(!m_WindowsShell && outdir.size())
|
||||||
|
{
|
||||||
|
outpath += ";pwd`\"/";
|
||||||
|
}
|
||||||
|
if(outdir.size() == 0 && !m_WindowsShell)
|
||||||
|
{
|
||||||
|
outpath = "\"`pwd`\"/";
|
||||||
|
}
|
||||||
// The full path versions of the names.
|
// The full path versions of the names.
|
||||||
std::string targetFullPath = m_LibraryOutputPath + targetName;
|
std::string targetFullPath = outpath + targetName;
|
||||||
std::string targetFullPathSO = m_LibraryOutputPath + targetNameSO;
|
std::string targetFullPathSO = outpath + targetNameSO;
|
||||||
std::string targetFullPathReal = m_LibraryOutputPath + targetNameReal;
|
std::string targetFullPathReal = outpath + targetNameReal;
|
||||||
std::string targetFullPathBase = m_LibraryOutputPath + targetNameBase;
|
std::string targetFullPathBase = outpath + targetNameBase;
|
||||||
targetFullPath = this->ConvertToRelativeOutputPath(targetFullPath.c_str());
|
|
||||||
targetFullPathSO = this->ConvertToRelativeOutputPath(targetFullPathSO.c_str());
|
|
||||||
targetFullPathReal = this->ConvertToRelativeOutputPath(targetFullPathReal.c_str());
|
|
||||||
targetFullPathBase = this->ConvertToRelativeOutputPath(targetFullPathBase.c_str());
|
|
||||||
|
|
||||||
// get the objects that are used to link this library
|
// get the objects that are used to link this library
|
||||||
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
||||||
@ -1165,6 +1176,9 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
|
|||||||
targetNameSO.c_str(),
|
targetNameSO.c_str(),
|
||||||
linkFlags);
|
linkFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
targetFullPath = m_LibraryOutputPath + targetName;
|
||||||
|
targetFullPath = this->ConvertToRelativeOutputPath(targetFullPath.c_str());
|
||||||
this->OutputMakeRule(fout, comment,
|
this->OutputMakeRule(fout, comment,
|
||||||
targetFullPath.c_str(),
|
targetFullPath.c_str(),
|
||||||
depend.c_str(),
|
depend.c_str(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user