QmlProjectManager: Generate file to define the default build path

when opening the root CMakeLists.txt with QtCreator

Change-Id: Ia448dab1b3161471fe2bb7870ffb79e68dd579fc
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2024-04-16 16:05:03 +02:00
parent 3e42b144ba
commit b17cd52f84
3 changed files with 21 additions and 0 deletions

View File

@@ -70,6 +70,10 @@ void CMakeWriterV1::writeRootCMakeFile(const NodePtr &node) const
const QString fileContent = fileTemplate.arg(appName, fileSection);
writeFile(file, fileContent);
const Utils::FilePath sharedFile = node->dir.pathAppended("CMakeLists.txt.shared");
const QString sharedTemplate = readTemplate(":/templates/cmake_shared");
writeFile(sharedFile, sharedTemplate);
const Utils::FilePath userFile = node->dir.pathAppended("qds.cmake");
QString userFileContent(DO_NOT_EDIT_FILE);
userFileContent.append(makeSubdirectoriesBlock(node));