From c337c7e205259d5944b19c2a6d2007f490379ddc Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Sun, 18 Mar 2012 13:40:01 +0100 Subject: [PATCH] Ninja: Fix substitution Don't forget the subdirectories. --- Source/cmNinjaNormalTargetGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 92421815a..35f3bafae 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -131,7 +131,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(),