summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6859445..2bad32c 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -141,7 +141,10 @@ cmNinjaNormalTargetGenerator
vars.CMTarget = this->GetTarget();
vars.Language = this->TargetLinkLanguage;
vars.Objects = "$in";
- std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
+ std::string objdir =
+ this->GetLocalGenerator()->GetHomeRelativeOutputPath();
+ objdir += objdir.empty() ? "" : "/";
+ objdir += cmake::GetCMakeFilesDirectoryPostSlash();
objdir += this->GetTargetName();
objdir += ".dir";
objdir = this->GetLocalGenerator()->Convert(objdir.c_str(),