diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-01 13:59:32 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-04-01 13:59:32 (GMT) |
commit | e2ed5d1c6443f976e70edf47e7ae580058615a5c (patch) | |
tree | 651bc1cb35616e56f3e80a836f41647bff618992 /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | 82101f78cfe57dc7afb8035a404f6a2efea44e4d (diff) | |
download | CMake-e2ed5d1c6443f976e70edf47e7ae580058615a5c.zip CMake-e2ed5d1c6443f976e70edf47e7ae580058615a5c.tar.gz CMake-e2ed5d1c6443f976e70edf47e7ae580058615a5c.tar.bz2 |
BUG: fix for non relative paths with spaces in the path
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index ae30cdd..7c90bc8 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1077,7 +1077,15 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, targetNameReal, targetNameBase); 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()) { outpath = "\"`cd "; @@ -1096,7 +1104,16 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, std::string targetFullPathSO = outpath + targetNameSO; std::string targetFullPathReal = outpath + targetNameReal; 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 std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") "; std::string objsQuoted = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS_QUOTED") + ") "; |