From f3c42f593e6a4d084b6ac1bd70fa597f923a2cbc Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 24 Dec 2003 10:51:43 -0500 Subject: [PATCH] BUG: use full paths via pwd for -L paths on unix shells --- Source/cmLocalUnixMakefileGenerator.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index e1f9eae00..7493a06a8 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -697,6 +697,16 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, std::string libpath = this->ConvertToOutputForExisting(libDir->c_str()); 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()); if((pos == std::string::npos || pos > 0) && libDir->find("${") == std::string::npos) @@ -704,13 +714,10 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, linkLibs += libPathFlag; if(outputRuntime) { - std::string rpath = "\"`cd "; - rpath += libpath; - rpath += ";pwd`\""; - runtimeDirs.push_back( rpath ); + runtimeDirs.push_back( fullLibPath ); } } - linkLibs += libpath; + linkLibs += fullLibPath; linkLibs += " "; } }