Browse Source

cmGeneratorTarget: query the local generator for the target directory

John Parent 5 months ago
parent
commit
36f85ee0cc
1 changed files with 3 additions and 8 deletions
  1. 3 8
      Source/cmGeneratorTarget.cxx

+ 3 - 8
Source/cmGeneratorTarget.cxx

@@ -5217,14 +5217,9 @@ bool cmGeneratorTarget::NeedImportLibraryName(std::string const& config) const
 
 std::string cmGeneratorTarget::GetSupportDirectory() const
 {
-  std::string dir = cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(),
-                             "/CMakeFiles/", this->GetName());
-#if defined(__VMS)
-  dir += "_dir";
-#else
-  dir += ".dir";
-#endif
-  return dir;
+  cmLocalGenerator* lg = this->GetLocalGenerator();
+  return cmStrCat(lg->GetCurrentBinaryDirectory(), '/',
+                  lg->GetTargetDirectory(this));
 }
 
 bool cmGeneratorTarget::IsLinkable() const