BUG: fix for non relative paths with spaces in the path

This commit is contained in:
Bill Hoffman 2004-04-01 08:59:32 -05:00
parent 82101f78cf
commit e2ed5d1c64
1 changed files with 19 additions and 2 deletions

View File

@ -1077,7 +1077,15 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
targetNameReal, targetNameBase); targetNameReal, targetNameBase);
std::string outpath; std::string outpath;
std::string outdir = this->ConvertToRelativeOutputPath(m_LibraryOutputPath.c_str()); std::string outdir;
if(m_UseRelativePaths)
{
outdir = this->ConvertToRelativeOutputPath(m_LibraryOutputPath.c_str());
}
else
{
outdir = m_LibraryOutputPath;
}
if(!m_WindowsShell && m_UseRelativePaths && outdir.size()) if(!m_WindowsShell && m_UseRelativePaths && outdir.size())
{ {
outpath = "\"`cd "; outpath = "\"`cd ";
@ -1096,7 +1104,16 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
std::string targetFullPathSO = outpath + targetNameSO; std::string targetFullPathSO = outpath + targetNameSO;
std::string targetFullPathReal = outpath + targetNameReal; std::string targetFullPathReal = outpath + targetNameReal;
std::string targetFullPathBase = outpath + targetNameBase; std::string targetFullPathBase = outpath + targetNameBase;
// If not using relative paths then the output path needs to be
// converted here
if(!m_UseRelativePaths)
{
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") + ") ";
std::string objsQuoted = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS_QUOTED") + ") "; std::string objsQuoted = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS_QUOTED") + ") ";