소스 검색

install: Generate InstallScripts.json in consistent location

Since commit 159ba027b9 (Install: Add parallel installation option,
2024-06-19, v3.31.0-rc1~333^2) the file was generated relative to the
current working directory.  This is not always the top of the build
tree, so specify the path explicitly.
Martin Duffy 9 달 전
부모
커밋
ca5e6dadb5
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      Source/cmGlobalGenerator.cxx

+ 4 - 1
Source/cmGlobalGenerator.cxx

@@ -1824,7 +1824,10 @@ void cmGlobalGenerator::WriteInstallJson() const
     for (const auto& file : this->InstallScripts) {
     for (const auto& file : this->InstallScripts) {
       index["InstallScripts"].append(file);
       index["InstallScripts"].append(file);
     }
     }
-    this->WriteJsonContent("CMakeFiles/InstallScripts.json", index);
+    this->WriteJsonContent(
+      cmStrCat(this->CMakeInstance->GetHomeOutputDirectory(),
+               "/CMakeFiles/InstallScripts.json"),
+      index);
   }
   }
 }
 }
 #endif
 #endif