diff options
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 5 | ||||
-rw-r--r-- | Source/cmQtAutoGenInitializer.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index a47b3c0..40f3ab5 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -407,6 +407,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets() } // Common directories + std::string relativeBuildDir; { // Collapsed current binary directory std::string const cbd = cmSystemTools::CollapseFullPath( @@ -424,6 +425,8 @@ bool cmQtAutoGenInitializer::InitCustomTargets() cmStrCat(cbd, '/', this->GenTarget->GetName(), "_autogen"); } cmSystemTools::ConvertToUnixSlashes(this->Dir.Build); + this->Dir.RelativeBuild = + cmSystemTools::RelativePath(cbd, this->Dir.Build); // Cleanup build directory this->AddCleanFile(this->Dir.Build); @@ -1357,7 +1360,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget() cmStrCat(this->Dir.Build, "/", timestampFileName); this->AutogenTarget.DepFile = cmStrCat(this->Dir.Build, "/deps"); this->AutogenTarget.DepFileRuleName = - cmStrCat(this->GenTarget->GetName(), "_autogen/", timestampFileName); + cmStrCat(this->Dir.RelativeBuild, "/", timestampFileName); commandLines.push_back(cmMakeCommandLine( { cmSystemTools::GetCMakeCommand(), "-E", "touch", outputFile })); diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h index 603c537..33749ba 100644 --- a/Source/cmQtAutoGenInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -178,6 +178,7 @@ private: { std::string Info; std::string Build; + std::string RelativeBuild; std::string Work; ConfigString Include; std::string IncludeGenExp; |