diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 70978c327..a881391c4 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -724,7 +724,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash(); objdir += this->Target->GetName(); objdir += ".dir"; - vars.ObjectDir = objdir.c_str(); + objdir = this->Convert(objdir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars.ObjectDir = objdir.c_str(); vars.Target = targetOutPathReal.c_str(); std::string linkString = linklibs.str(); vars.LinkLibraries = linkString.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cd08bdb1e..6c3afbdc7 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -614,6 +614,9 @@ cmMakefileTargetGenerator cmLocalGenerator::SHELL).c_str(); vars.Object = shellObj.c_str(); std::string objectDir = cmSystemTools::GetFilenamePath(obj); + objectDir = this->Convert(objectDir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); vars.ObjectDir = objectDir.c_str(); vars.Flags = flags.c_str(); vars.Defines = defines.c_str();